Link to home
Start Free TrialLog in
Avatar of KOCUBA
KOCUBA

asked on

App not working on users PC

I am working on an application that allows that brings ups a form to select a winner form a SQL Server table.  When I click on the menu option for this form I get the following error messages-- "ActiveX component can't create object" and "Run-time error '91': Oject variable or with block variable not set".  This works absolutely fine in from my machine in VB, but I get these messages when I create an install the application on to the users PC.
I've been reveiwing my code and everything looks fine.

Can someone please help.
Dave
Avatar of pauljk
pauljk

Kocuba...

It sounds like you are not copying and registering the OCX's or DLL's that are required by your application to run.  Your computer has the entire development environment and these files already reside there.

Avatar of KOCUBA

ASKER

I have no dll's.  So if my ocx files, which are included in the setup, are not registering how do I get them registered.

Well, the install should register them in the install...  If you used the package and deployment wizard from Visual Studio, you should check the Setup.lst file to see if the files listed there match the files that you have referenced for your project.
Avatar of Brendt Hess
Are you using ADO to access the data?  It's possible that the user doesn't have that installed.  See this reference at Microsoft:

HOWTO:  Distribute ADO with the VB5 application setup wizard

http://support.microsoft.com/support/kb/articles/Q184/2/65.ASP?LN=EN-US&SD=gn&FR=0
goto a dos prompt and goto the winsys directory.  run regsvr32 with the argument of your ocx name.  Such as
C:\winnt\system32\regsvr32 msadodc.ocx.

Is this on vb5 or vb6? and what version of ado? 2.0 or 2.1.  If 2.0 I would suggest using 2.1.  There seems to be a compatablity issue with 2.0 and 2.1

Avatar of KOCUBA

ASKER

I have no dll's.  So if my ocx files, which are included in the setup, are not registering how do I get them registered.

See schmar's regsvr32 comments.
You can also get the first error (the second is probably related) if you have old versions of ocx/dll's on the end-user machine.  Don't just check if these are registered, also check version info and compare to the development machine.
Avatar of KOCUBA

ASKER

bhess1,

Please post your answer.  That is what finally worked.

Everyone thank you for your help.

ASKER CERTIFIED SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KOCUBA

ASKER

Sorry. I did not know that that had changed.

Thanks Again