Runtime Error 13 Type Mismatch

O

Outatym

Have a userform called PPSForm

Trying to call it up using the following code:

Sub PPS()
'
' PPS Macro
' Macro created 4/18/2008 by Chris
'

PPSForm.Show

End Sub

When It runs I get the same error for type mismatch. I have shown userforms
before but never had this issue. Any ideas?
 
J

Jean-Guy Marcil

Outatym said:
Have a userform called PPSForm

Trying to call it up using the following code:

Sub PPS()
'
' PPS Macro
' Macro created 4/18/2008 by Chris
'

PPSForm.Show

End Sub

Hum... opening the door for yet another debate on magic forms....
When It runs I get the same error for type mismatch. I have shown userforms
before but never had this issue. Any ideas?

Are you religiously declaring all variables as well as typing them?
I mean:
Dim strText As String
instead of
Dim strText

Also, are you religiously using "Option Explicit" at the top of each module?
(Type mismatch will not be automatically detected by Option Explicit unless
you do a manual compile: Debug > Compile Project)

If not, you deserve a a good beating! ;-)

You probably have code in the form Initialize or Activate event that is the
cause of the problem.
Try debugging with F8 or by placing a few stops in the appropriate places.
 
O

Outatym

Ahhh...it was some converting I was doing within the initialization
procedure...

Thanks for your help! This is why I love coming here!!!
 

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