Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: Type mismatch 13

Status
Not open for further replies.

GODSWL

Programmer
Apr 5, 2002
11
0
0
US
When I install a VB application one 98 machine it runs OK; when trying to install the same package on another 98 machine and I get a runtime error that gives me an initialization error........

I know the logic that getting the error

sub ClassInit()
On error goto errorhandler

set gDS = Nothing 'this is defined as Public gDS as clsDataSource ' in a global definitions section
set gDS = New clsDataSource 'this is a class module

' other logic here

exitroutine:
exit sub
errorhandler
error message--------- here!
err.clear
goto exitroutine
end sub
 
I would like to help but I need you to clarify and clean up your code sample for me. Is the err.clear method giving the error?

-Matt
 
I'm just clearing the recordset object here.
set gDS = Nothing

This is the part where I getting the error.
set gDS = New clsDataSource


The other code above in the previous statement is just some error handling.
That's where it writes out the error when I try to instantiate a new datasource class..
 
Ok, what is the error exactly? Is it something like 'Can't create ActiveX Object'? If it is then make sure the dll/ocx that the class resides in is properly registered on that machine.

-Matt
 
How do I determine what dll/ocx the class reside in????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top