Type mismatch error on form show

D

Darach

Hi

I am experiencing a problem for some users for a macro-enabled spreadsheet I
have developed. The users are using Office XP, I have developed the
spreadsheet in Office 2003, but it has worked on Office XP without any
problems until now.

They are getting the error message 'Type Mismatch -2147352571' when they
click a button on one of the sheets. The code behind the button is just
calling a form.show event. I am at a loss to explain why this is occurring.
Can any one help?

Thanks

Darach
 
K

K Dales

No real answer, just speculation and a line of reasoning to check:
Since you state "form.show" and not Userform.show, I am thinking perhaps
you are not using a standard userform here?
If there are conflicting object class names (as, for example, having an
MSForms Form object in the same project as an Access Form object) and you do
not specify (e.g. Dim MyForm as Form) VBA follows the order listed in
References to determine which one takes precedence. And I have had upgrades
to Office on my computer that have modified the references in my projects
without me "doing anything."
So I would suggest checking the references to see if there might be
conflicts between form objects in the different libraries listed. The best
solution is to explicitly reference the object (Dim MyForm as Access.Form,
for example).

If this isn't it, it would help to see the code - especially the line where
the error occurs and also (if you are using a variable for the form object)
how you have Dim'ed the object variables.
 

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