Log in

View Full Version : Vb 6.3 run time error


daves
Feb 17, 2006, 12:39 PM
I need some help here.
I am writing applications for my company using Excel 2003 and Visual Basic 6.3.
The applications I have written before we got Windows XP used Excel and Visual Basic 6.0. To call up the Input form I have used the following code:

Sub auto_open()
UserForm1.Show
End Sub

When I tried to use the same code, in VB 6.3 I got the following error message

Run Time error '424':

Object required

I am not sure what to do. I have looked in the Microsoft website and all of the information I was able to find seem to indicate that this code should work.

When I ran the debug function, 'UserForm1.Show' was highlighted. I would appreciate any suggestions or information that anyone has.

Thanks

daves

Simon887
Sep 22, 2008, 07:54 AM
I use VB 6.3 as well. I'm just a beginner and I follow Gary Cornell's book. For starting or opening up a form.
Try,
Sub Form_Load() 'instead of auto_open
UserForm1.Show 'add the show method
End Sub

I hope you find it useful.