VBA won't run on new PC

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
danhinz
Posts: 22
Joined: Mon May 07, 2007 5:48 pm

VBA won't run on new PC

Post by danhinz » Fri Aug 31, 2007 6:55 pm

I was running iMacros v6 Beta with MS Office 2003
I'm moving to a new computer and "upgrading" the software.
Installed Office 2007. Installed iMacros v6 (released version)
The program submits data from Excel to a website then adds any of the
retrieved data to the spreadsheet.

When I attempt to run the VB program I get a Run-time error '429'
"ActiveX component can't create object "

The debugger highlights this line:

Set iim1 = CreateObject("InternetMacros.iim")

I thought it might be related to the fresh iMacro install so I opened iMacros browser and tried again, no luck. The VB versions are 6.3 (MSO 2003) and 6.5 (MSO 2007)

Any ideas on what to fix?
danhinz
Posts: 22
Joined: Mon May 07, 2007 5:48 pm

Post by danhinz » Fri Aug 31, 2007 7:22 pm

I figured out I needed to change the line highlighted
by the debugger to say "imacros" instead of "InternetMacros.iim"
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Sun Sep 02, 2007 7:06 am

Thanks a lot for this hint. By design the old ("InternetMacros.iim") and the new name ("imacros") should work in V6. But we will investigate this issue further.
sidtak
Posts: 1
Joined: Thu Oct 25, 2007 12:37 pm

VBA example

Post by sidtak » Thu Oct 25, 2007 1:05 pm

Hi,

I´m using a trial version, and I didn´t make work a VBA example:
Submit-2-Web.iim

I changed this line in VBA excel

Set iim1 = CreateObject("imacros")
iret = iim1.iimInit

and nothing happens when the line below is executed

iret = iim1.iimPlay("wsh-submit-2-web.iim")
If iret < 0 Then
MsgBox iim1.iimGetLastError()
End If

just open a empty msgbox, without call a imacro application.
What could be???

ps. this script "wsh-submit-2-web" appears in imacro player list
jerryrou
Posts: 8
Joined: Thu Apr 05, 2007 4:34 am

/Macros directory has moved! How to find it automatically?

Post by jerryrou » Wed Jan 30, 2008 8:40 pm

My previous VBA scripts used the fact that all macros are in "C:\Program Files\iMacros\Macros\" (I would use iimplay on the .iim files in this directory). In fact it appears that macros HAVE to be in this directory to use iimplay (is there an alternate method?).

The new Vista installation has moved them, which means I now have to script to find the correct directory depending on which OS it is being used on (is there a way to avoid this?).

Vista: c:\users\<user-name>\Documents\iMacros\Macros

Win 2000/XP/2003: C:\Documents and Settings\<user-name>\My Documents\iMacros\Macros

How do I find that location (in code) so that my scripts will work on any XP or Vista machine? Is there a way to play a macro not in that directory?

The only other work around I have found is to run the iimplay line by line from a known source. See http://forum.iopus.com/viewtopic.php?t= ... s+settings

Thanks!
Jerry
jerryrou
Posts: 8
Joined: Thu Apr 05, 2007 4:34 am

Clarification - Want to write .iim files to /Macro directory

Post by jerryrou » Thu Jan 31, 2008 4:44 am

Just want to clarify. I want to write .iim files to the /Macro directory using VBA so they can be used w/ iimplay. However, the /Macro directory is a moving target depending on the OS.

Thanks,
Jerry
jerryrou
Posts: 8
Joined: Thu Apr 05, 2007 4:34 am

Run .iim code from a VBA macro not the \Macros directory

Post by jerryrou » Mon Feb 04, 2008 3:49 pm

So as far as I can tell it is better to run a macro from code instead of using VBA to install the .iim files in a directory. This way it is totally OS independent. The link below shows how to run a .iim w/o it being in the \Macros directory. Any comments??

http://wiki.imacros.net/VBS_looping
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Wed Feb 06, 2008 12:44 am

You can also specify a full path with iimPlay:

i = iim1.iimPlay ("c:\imacros\my_macro.iim")
Tyamica
Posts: 10
Joined: Tue Apr 03, 2007 2:53 pm

Re: VBA won't run on new PC

Post by Tyamica » Tue Nov 04, 2008 8:50 pm

I'm having an issue similar to this. Trying to run V5 on a pc that has Office 2007 and receiving this same error. Also, when opening iMacros from the desktop, receiving a run time error and asking to select a debugger. Any ideas on what could be causing this? Is V5 compatible with 2007?
dahousecat
Posts: 6
Joined: Fri Feb 12, 2010 12:33 pm

Re: VBA won't run on new PC

Post by dahousecat » Tue Feb 16, 2010 10:30 am

I am getting the same error (Runtime error 429 - ActiveX competent can't create object) however I am just opening the imacros.exe file directly without scripting.

I have tried installing and reinstalling but I'm still getting the same error.

After the error the browser does open however none of the buttons or the menu commands do anything and only some of the graphical elements are loaded.

This is with version 6.90 downloaded today.

(And this is running on a machine with XP SP3)
D4rkh0rs3
Posts: 1
Joined: Wed Oct 10, 2012 3:19 pm

Problem with code from iMacros demo

Post by D4rkh0rs3 » Wed Oct 10, 2012 3:50 pm

Apologies if this has been answered elsewhere, but I couldn't find the solution...

I'm trying to create a macro in Excel 2003, that will: submit text from a spreadsheet, play an iMacro that extracts text, then inputs the extracted text back into the spreadsheet. I'm using the IE browser extension of iMacros on a PC running Windows XP. I've been following along with the example found at http://wiki.imacros.net/Excel-VBA-StockSearch and adjusting to fit my particular situation.

I'm unable to get very far though as Excel displays the following error "Run-time error'429': ActiveX component can't create object". When I debug, the problem appears to be with the line:

Set iim1 = CreateObject("imacros")

I know a (very) little VBA, basically just enough to copy/paste/adjust code. Could someone suggest a fix to get me past this roadblock?

Thanks!
ScriptJockey
Posts: 14
Joined: Sun Jan 29, 2012 4:18 pm
Location: imacros AT scriptjockeys.net

Re: VBA won't run on new PC

Post by ScriptJockey » Fri Oct 12, 2012 12:23 am

Hi D4rkh0rs3,

You need to use the iMacros scripting interface in order to automate iMacros from Excel VBA. The scripting interface is only included with the Enterprise Edition (and not the free IE add-on). You can download a trial version from here:

http://www.iopus.com/download/imacros/
Alex Oo
Posts: 1
Joined: Thu Dec 03, 2015 2:19 am

Re: VBA won't run on new PC

Post by Alex Oo » Thu Dec 03, 2015 2:46 am

I also face same problem on ..
Set iim1 = CreateObject ("IMacros")
i = iim1.iimInit()

when i run, debug stop at ....Set iim1 = CreateObject ("IMacros")

I use, excel macro to link excel value and imacros...

Do i need to set anything before program run?
Post Reply