Problem with User Forms

TSoren23

New Member
Joined
Sep 11, 2006
Messages
16
I created a user Form within a workbook and launch it using a maco on a swith within a WS called Open. I then created another User form. same workbook, same launch methiod. But this one will not launch and I get a Run Time error 424 - Object required.
The code in both macros are the same except for the name and form.
Any suggestions as to why I am getting this error.

"Does not work"
Sub ShowSafetyQualityForm()
FrmSQForm.Show
End Sub

"Works"
Sub ShowDailyEnterForm()
frmDailyEnter.Show
End Sub
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,218
Office Version
  1. 365
Platform
  1. Windows
Have you double checked the names?

Do you have any code that runs when the userform is shown?

That would perhaps be in the Initialize or Load event.
 

TSoren23

New Member
Joined
Sep 11, 2006
Messages
16
I have checked the names. Form name is the same. macro name is the same.
I will check other code
 

TSoren23

New Member
Joined
Sep 11, 2006
Messages
16
Found the problem, Thank you.
Working on this last last night. I just could not see it.

"Code"
Sub ShowSafetyQualityForm()
FrmSQForm.Show
End Sub

I left the "frm" off of the actual formm name I had "SQform".

Thank you for your help
 

Watch MrExcel Video

Forum statistics

Threads
1,122,691
Messages
5,597,562
Members
414,156
Latest member
WDMix

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top