VB to load a form

gmazza76

Well-known Member
Joined
Mar 19, 2011
Messages
626
Office Version
  1. 365
Platform
  1. Windows
Good Afternoon,

I normally use the following code to load a userform

Code:
Sub Group7_Click()
   
    query.Show
   
End Sub

This has worked numerous times but i am now getting a "run-time error'424' Object required. erro and i dont know what this means.

Any help would be great.

Cheers
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Tuelor

Board Regular
Joined
Mar 19, 2011
Messages
101
Has the perform been recently renamed?

I would also rename the form to frmQuery to make obvious what type of object you are referring to.

D
 

Glory

Well-known Member
Joined
Mar 16, 2011
Messages
640
It could be a lot of things. If anything goes wrong in the userform initialization event or if there's any kind of syntax or object-oriented error in the userform object module there's every possibility the code will error out at the "Userform.Show" statement in the standard module you use to show the form.
 

Watch MrExcel Video

Forum statistics

Threads
1,119,061
Messages
5,575,872
Members
412,689
Latest member
nhsmedic
Top