This entry was posted on Monday, May 28th, 2012 at 2:24 pm and is filed under Tech Stuff. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.
If you are running on a 64bit windows 7 system and have a VBA script that creates a COM/ActiveX/OLE component which fails with an error message like:
‘ActiveX component can’t create object’
Even though you know the component is registered and that you are using the correct progId etc, then it may be failing because the COM component in question is 32 bit and by default Windows7 runs the 64bit scripting engine.
If this is the case then you can get around the problem by explicitly using the 32 bit scripting environment which is most likely located here:
C:\Windows\SysWOW64\cscript.exe
So to run example.vbs in the 32bit environment use the following:
C:\Windows\SysWOW64\cscript.exe example.vbs
Hopefully you 32bit component will now load… mine did

June 2nd, 2012 at 6:18 am
I’m having the exact problem you addressed, but how do I have MS Access tell Win 7 I want my VBA code run in 32-bit mode?
BTW, I realize your probably not a VBA programmer, but might be able to point me in the rigth direction…
June 2nd, 2012 at 6:23 am
Sorry, here’s my exact code and I’m 99.9% it’s the problem you mentioned because the script works on my 32-bit Win 7 machine and my 32-bit Win XP machine with no problems.
My purpose is that when users first install my Access runtime application, I want to see if they have Outlook installed. Based on what’s detected, a flag is set in a setup table.
Dim obj as Object
On Error Resume Next
Set obj = CreateObject(“Outlook.Application”)
If err.number = 0 then
…
Else
…
ENd if
June 2nd, 2012 at 6:30 am
Also, I should mention I don’t want to mess with vb scripts–I want to keep everything inside of my Access application.