Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SMS SMS is offline
external usenet poster
 
Posts: 15
Default type mismatch when opening a userform


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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
SMS SMS is offline
external usenet poster
 
Posts: 15
Default type mismatch when opening a userform


Brilliant! Thank you!

On Oct 2, 2:55*pm, "JLGWhiz" wrote:
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!- Hide quoted text -


- Show quoted text -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate vba userform type mismatch when decimal is entered Pam Excel Programming 1 December 28th 08 08:46 AM
Type Mismatch: array or user defined type expected ExcelMonkey Excel Programming 4 July 6th 06 03:40 PM
Type mismatch using rnge as Range with Type 8 Input Box STEVE BELL Excel Programming 11 December 3rd 05 05:02 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Passing Userform Listbox to sub causes type-mismatch error Kleev Excel Programming 2 October 19th 05 08:46 PM


All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"