type mismatch when opening a userform

S

SMS

This is giving me a type mismatch error.... it is a button on the
worksheet, used to open a userform.
It works every other time I have tried it... but not this time.


Private Sub CommandButton1_Click()
MyUserForm.Show
End Sub


Any ideas?

Thank you!
 
J

JLGWhiz

Many times you will get the debug hilite on the show command when the
problem is really in the initialize event code. Put a breakpoint at the
beginning of the initalize code and run the show command. Then when it
breaks, use F8 to step through and find the actual problem line.
 
S

SMS

Brilliant! Thank you!

Many times you will get the debug hilite on the show command when the
problem is really in the initialize event code.  Put a breakpoint at the
beginning of the initalize code and run the show command.  Then when it
breaks, use F8 to step through and find the actual problem line.











- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top