This is the Unhandled error I am getting on a Timer event. It is only running a listview refresh so the code isn't that complicated.
System.NullReferenceException: Object reference not set to an instance of an object.
at Mysqlsample.Form1.tmrDelay_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.Callback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime)
I put in an error handler 'On Error GoTo InitializeError' with a msgbox to let me know if it was still there rather than an Exit Sub at this stage but even removing all the code within the timer event it still goes to the error handler. I suppose I could allow it to exit sub but why is there an error there. I notice all the timers go to an error handler with or without code!!
If anyone can help I would appreciate it.