View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default type mismatch when opening a userform

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.



"SMS" wrote in message
...

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!