ActiveX component can't create object
Hi,
I have an issue with one of the customer machine that is when I try to install the application it gives the 429-ActiveX component can't create object error.
I tried register vbscript.dll and scrrun.dll on both system path and app path but no success. It is a XP professional OS SP3 installed. My application worked before on the same machine and the customer did some changes because of the virus attack of his machine. After the change gives the error in my app.
I found the code where it gives the error here is the code
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & SpecFolder(CSIDL_COMMON_APPDATA) & "\" & workingdirectory & "\TestDb.mdb"
Please advise me.
Re: ActiveX component can't create object
Can you open your project file (*.VBP) in Notepad and copy and paste all its contents here?
Re: ActiveX component can't create object
Here is the details you asked.
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\system32\stdole2.tlb#OLE Automation
Reference=*\G{00000205-0000-0010-8000-00AA006D2EA4}#2.5#0#C:\Program Files\Common Files\System\ado\msado25.tlb#Microsoft ActiveX Data Objects 2.5 Library
Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; ieframe.dll
Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#C:\Windows\system32\scrrun.dll#Microsoft Scripting Runtime
Reference=*\G{332B82D3-3ED6-11D4-B1B5-00105AA5CCFF}#5.7#0#C:\Windows\system32\vbSendMail.dll#SMTP Send Mail for VB6.0
Object={3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}#4.0#0; MSHTML.TLB
Reference=*\G{3F4DACA7-160D-11D2-A8E9-00104B365C9F}#5.5#0#C:\Windows\system32\vbscript.dll\3#Microsoft VBScript Regular Expressions 5.5
Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#C:\Windows\system32\MSBIND.DLL#Microsoft Data Binding Collection
Reference=*\G{F5078F18-C551-11D3-89B9-0000F81FE221}#3.0#0#C:\Windows\System32\msxml3.dll#Microsoft XML, v3.0
Reference=*\G{565783C6-CB41-11D1-8B02-00600806D9B6}#1.2#0#C:\Windows\system32\wbem\wbemdisp.TLB#Microsoft WMI Scripting V1.2 Library
Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#C:\Windows\system32\MSSTDFMT.DLL#Microsoft Data Formatting Object Library 6.0 (SP6)
Reference=*\G{3F4DACA7-160D-11D2-A8E9-00104B365C9F}#1.0#0#C:\Windows\system32\vbscript.dll\2#Microsoft VBScript Regular Expressions 1.0
Reference=*\G{00000600-0000-0010-8000-00AA006D2EA4}#2.8#0#C:\Program Files\Common Files\System\ado\msadox28.tlb#Microsoft ADO Ext. 2.8 for DDL and Security
Reference=*\G{90290CCA-F27D-11D0-8031-00C04FB6C701}#1.0#0#C:\Program Files\Common Files\designer\MSHTMPGR.DLL#Microsoft DHTML Page Runtime Library 1.0
Object={05BFD3F1-6319-4F30-B752-C7A22889BCC4}#1.0#0; AcroPDF.dll
Reference=*\G{662901FC-6951-4854-9EB2-D9A2570F2B2E}#5.1#0#C:\Windows\system32\winhttp.dll#Microsoft WinHTTP Services, version 5.1
Reference=*\G{00025E01-0000-0000-C000-000000000046}#5.0#0#C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll#Microsoft DAO 3.6 Object Library
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; Comdlg32.ocx
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
Object={FBC672E3-F04D-11D2-AFA5-E82C878FD532}#5.0#0; AS-IFce1.ocx
Object={7C39F645-737D-44D2-97EF-FA68FCAFB398}#2.1#0; Many2PDFX.ocx
Object={248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0; MSWINSCK.OCX
Object={C18424FD-277B-4362-B7A8-2788E7DBF8B4}#1.0#0; QProGIF.ocx
Object={48E59290-9880-11CF-9754-00AA00C00908}#1.0#0; MSINET.OCX
Object={FD210133-51E6-4F5E-9803-6E42E1638367}#1.0#0; RifControls.ocx
Re: ActiveX component can't create object
Your project appears to rely on a number of ActiveX components. Have you tried creating several new projects that uses each one (and only one of them) and tried running them on your customer's machine? You'll need to identify which OCX fails by running each one of them independently of the others.
BTW, in your OP, where is the code for SpecFolder(CSIDL_COMMON_APPDATA) and what is workingdirectory?
Re: ActiveX component can't create object
I tried register all the OCX and DLL manually on customer machine and no success.
Working directory is the name of the project (it will help to load the db file under the project name folder)
Here is the code for SpectFolder
Public Const CSIDL_COMMON_APPDATA = &H23
Public Function SpecFolder(ByVal lngFolder As Long) As String
Dim lngPidlFound As Long
Dim lngFolderFound As Long
Dim lngPidl As Long
Dim strPath As String
strPath = Space(MAX_PATH)
lngPidlFound = SHGetSpecialFolderLocation(0, lngFolder, lngPidl)
If lngPidlFound = NOERROR Then
lngFolderFound = SHGetPathFromIDList(lngPidl, strPath)
If lngFolderFound Then
SpecFolder = Left$(strPath, _
InStr(1, strPath, vbNullChar) - 1)
End If
End If
CoTaskMemFree lngPidl
End Function
Re: ActiveX component can't create object
I tried register all the OCX and DLL manually on customer machine and no success.
Working directory is the name of the project (it will help to load the db file under the project name folder)
Here is the code for SpectFolder
Public Const CSIDL_COMMON_APPDATA = &H23
Public Function SpecFolder(ByVal lngFolder As Long) As String
Dim lngPidlFound As Long
Dim lngFolderFound As Long
Dim lngPidl As Long
Dim strPath As String
strPath = Space(MAX_PATH)
lngPidlFound = SHGetSpecialFolderLocation(0, lngFolder, lngPidl)
If lngPidlFound = NOERROR Then
lngFolderFound = SHGetPathFromIDList(lngPidl, strPath)
If lngFolderFound Then
SpecFolder = Left$(strPath, _
InStr(1, strPath, vbNullChar) - 1)
End If
End If
CoTaskMemFree lngPidl
End Function
Re: ActiveX component can't create object
You might need to set the Binary compatibility option! Checkout the links in post #2 here.