VB to load a form

gmazza76

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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

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,108,922
Messages
5,525,647
Members
409,658
Latest member
Yardcell

This Week's Hot Topics

Top