VB to load a form

gmazza76

Well-known Member
Joined
Mar 19, 2011
Messages
609
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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

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,113,909
Messages
5,544,999
Members
410,647
Latest member
LegenDSlayeR
Top