Can't create commondialog object - error 80040112 
Author Message
 Can't create commondialog object - error 80040112

What's the text error message?  0x80040112 is not a unique COM error code.  It has different
meanings in the context of different COM components.  If necessary, use On Error Resume Next and
trap the error and display Err.Description.  You may in fact have a licensing problem in spite of
the fact that you have VB 5 installed.  Have you tried equivalent code from a simple VB project?

If the license problem turns out to be the case, see:

Q181854 - FILE: Vbc.exe Fixes VB 5.0 Control Installation Problem
http://www.*-*-*.com/

--
Michael Harris
MVP Scripting

Err, I messed up the line numers. Actually it's line 4 causing the error
(that on trying to create the CommDlg object). On  more thing that might be
of interst is that the comp is running WSH 5.5 Beta2.

Alex



Fri, 01 Nov 2002 03:00:00 GMT  
 Can't create commondialog object - error 80040112
The CommonDialog control won't work from a WSH hosted script on a non-development machine.

The Shell.Application object has a BrowseForFolder method that will also let you browse for files,
but limits you to machines that have "Active Desktop" capability.

I know someone out there has put together other solutions, but I haven't kept track of them.  If
you're patient, I'm sure someone will jump in and post a relevant link (or two ;-)...

--
Michael Harris
MVP Scripting


Ok - it turned out to be a licensing problem. The program from the KB
article fixed it.

Now - Do I presume correctly that this code will only run on machines with a
design-time license for the control?
And if so, are there any other controls that perform similar to the
commondialog control but need no special license? Some freeware things?

Either way,
Thanks



Quote:
> What's the text error message?  0x80040112 is not a unique COM error code.
It has different
> meanings in the context of different COM components.  If necessary, use On

Error Resume Next and
Quote:
> trap the error and display Err.Description.  You may in fact have a

licensing problem in spite of
Quote:
> the fact that you have VB 5 installed.  Have you tried equivalent code

from a simple VB project?
Quote:

> If the license problem turns out to be the case, see:

> Q181854 - FILE: Vbc.exe Fixes VB 5.0 Control Installation Problem
> http://support.microsoft.com/support/kb/articles/Q181/8/54.ASP

> --
> Michael Harris
> MVP Scripting




Quote:
> Err, I messed up the line numers. Actually it's line 4 causing the error
> (that on trying to create the CommDlg object). On  more thing that might
be
> of interst is that the comp is running WSH 5.5 Beta2.

> Alex



Fri, 01 Nov 2002 03:00:00 GMT  
 Can't create commondialog object - error 80040112
Hi,

I'm trying to create a commondialog object on a PC with VB 5.0 SP3 installed
via the following Syntax:

Option Explicit
Dim WSHShell, objDlg, strFName
set WSHShell = wscript.CreateObject("WScript.Shell")
set objDlg = wscript.CreateObject("MSComDlg.CommonDialog")
objDlg.Filter = "All Files (*.*)|*.*|VBScript Files (*.vbs)|*.vbs"
objDlg.FilterIndex = 2
objDlg.MaxFileSize = 260
objDlg.CancelError = true
objDlg.ShowOpen
strFName = objDlg.Filename
WSHShell.popup strFName
Set objDlg = Nothing
WSHShell.Quit

Now, when I try to run this I recieve an error 0x80040112 for line1, row 1.
What does this mean? How can I avoid this?

Thanks for any help
Alex



Sat, 02 Nov 2002 03:00:00 GMT  
 Can't create commondialog object - error 80040112
Err, I messed up the line numers. Actually it's line 4 causing the error
(that on trying to create the CommDlg object). On  more thing that might be
of interst is that the comp is running WSH 5.5 Beta2.

Alex



Sat, 02 Nov 2002 03:00:00 GMT  
 Can't create commondialog object - error 80040112
Ok - it turned out to be a licensing problem. The program from the KB
article fixed it.

Now - Do I presume correctly that this code will only run on machines with a
design-time license for the control?
And if so, are there any other controls that perform similar to the
commondialog control but need no special license? Some freeware things?

Either way,
Thanks



Quote:
> What's the text error message?  0x80040112 is not a unique COM error code.
It has different
> meanings in the context of different COM components.  If necessary, use On

Error Resume Next and
Quote:
> trap the error and display Err.Description.  You may in fact have a

licensing problem in spite of
Quote:
> the fact that you have VB 5 installed.  Have you tried equivalent code

from a simple VB project?
Quote:

> If the license problem turns out to be the case, see:

> Q181854 - FILE: Vbc.exe Fixes VB 5.0 Control Installation Problem
> http://support.microsoft.com/support/kb/articles/Q181/8/54.ASP

> --
> Michael Harris
> MVP Scripting




Quote:
> Err, I messed up the line numers. Actually it's line 4 causing the error
> (that on trying to create the CommDlg object). On  more thing that might
be
> of interst is that the comp is running WSH 5.5 Beta2.

> Alex



Sat, 02 Nov 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Help!!!: Errors with 'MSComDlg.CommonDialog'

2. Run-time error '429': ActiveX component can't create object

3. OLE Error 80040112

4. help ActiveX Error : ActiveX component can't create object

5. Errors with VBScript macro - Can't Create Object, Script Engine Not Installed Correctly

6. Error: Automation Server can't create object

7. Can't create object Error

8. ActiveX Error : ActiveX component can't create object

9. Jscript error: Automation Server can't create object

10. Run-time Error 429 (ActiveX can't create object)

11. Can't Create Object Error!

12. JScript runtime error: Automation server can't create object

 

 
Powered by phpBB® Forum Software