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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Common Dialog box is returning error.

Status
Not open for further replies.

Durkin

Programmer
Nov 6, 2000
304
GB
I'm using a common dialog box to select a filename to save a output to a text file. It's the usual problem, it works fine on my PC but as soon as I deploy it to the users I get the error 'ActiveX component can't create object'. I looked up the error in the MSDN library and it had various suggestions about what might be wrong, all of which I checked out. Next, I created a small database with one form containing a button and a common dialog box just as a test and sent it out to a users machine. In this case the dialog box works fine. The difference between that and my application is that I'm not using the control in my application - I am creating the object in code. I thought maybe there was a problem in my code but then it works on my own machine so it must be syntactically correct at least. I've used both of the following methods to create the object, both work on my machine and not on the users':

Set dlgFName = CreateObject("MSComDlg.CommonDialog")
& Set dlgFName = New CommonDialog

At this stage I'm stumped. I know there's an API call I could use but I'd rather not. Any help would be much appreciated. Durkin
alandurkin@bigpond.com
 
Does the user's machine have the correct library installed and registered, as well as the correct versions of the dependancy files for MSComDlg??

Simon
 
It should do. I compared the registry on my machine and the users' machine and both looked pretty much the same. I don't know if the dependency files are there I thought it would all be in the .ocx and anyway I actually got it working when I used the control on a form rather than just creating it in code. Also, I deployed using the Package and Deployment wizard so that should have included any files needed. Durkin
alandurkin@bigpond.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top