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

Create Object help

Status
Not open for further replies.

Zooby12

Programmer
Aug 10, 2011
8
US
I'm unsure as to how to create an object properly. I keep on getting the error code 800A01AD - ActiveX component can't create object. I don't know if this is because of my script or my computer setup. I'm on Windows 7 x64.
 
Hi,

What kind of object do you want to create?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
...and what code are you using to create it?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Sorry, I have no clue when it comes to objects. I'm trying to pass a macro onto this browser plugin called iMacros, and the example script they provided created the object this way. However, it does not work for me.

Code:
Option Explicit
Dim iim1,iret
Set iim1 = CreateObject("imacros")
iret = iim1.iimInit("",FALSE) 'connect to open iMacros browser window 

Dim counter,counter2
counter = 1 
counter2 = 1
Dim macro

Do While Not (iret < 0)
If (counter < 31) Then
	macro = "CODE:" 'This is where the macro is defined, I didn't put it in here for now.
	counter2 = counter2 + 1
End If

iim1.iimSet "counter", counter
iret = iim1.iimPlay(macro)
counter = counter + 1

Loop
 
Sorry, irrelevant to the point but this is the real code (accidentally omitted the elseif).

Code:
Option Explicit
Dim iim1,iret
Set iim1 = CreateObject("imacros")
iret = iim1.iimInit("",FALSE) 'connect to open iMacros browser window 

Dim counter,counter2
counter = 1 
counter2 = 1
Dim macro

Do While Not (iret < 0)
If (counter < 31) Then
	macro = "CODE:" 'This is where the macro is defined, I didn't put it in here for now.
ElseIf (counter = 31) Then
	macro = "CODE:"
	counter2 = counter2 + 1
End If

iim1.iimSet "counter", counter
iret = iim1.iimPlay(macro)
counter = counter + 1

Loop
 
You need to run the script with the 32-bit version of cscript or wscript, which is found in C:\Windows\SysWOW64 by default.
 
I have seen someone try that and it worked for them; for some reason, however, when I just tried it I still get the error. I'm not sure why.
 
Do I have to register some dll's or something, mayhaps?
 
You may do. I think most of us were working on the assumption that iMacros was part of a software package that had been installed on your PC. It certainly isn't anything to do with Microsoft. So if you haven't installed iMacros ( which would normally include registering the relevant DLLs) then no, it won't work until you do ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top