How to Fix Runtime Error 2147467259
Posted on Saturday, July 13, 2013
|
Comments Off
1. Open up your Visual Basic project, and insert the following line in the top of the function that calls 'SetFocus:' On Error GoTo FocusErr.
2. Create a label at the bottom of the function, writing the following:FocusDone:Exit Function
3. Create another label below 'FocusDone,' writing the following:FocusErr:If Err.Number = -2147467259 ThenResumeEndIf.This makes your application resume on that error, retrying the 'SetFocus' call until the control actually appears. Save your project, and build it using the 'Tools' menu in your application.