Using VBA and iMacros to take data from Excel Sheet to fill

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++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:


Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Using VBA and iMacros to take data from Excel Sheet to fill

by jinhui on Thu Oct 26, 2017 2:39 am

I have some error while running the VBA and the error code 429, ActiveX component can't create object, appears.

Code: Select all
Option Explicit

   Private Sub CommandButton2_Click()
   MsgBox "Reads data row from an Excel sheet and submit this information to a website."
   Dim imacro, iret, row, totalrows
   Set imacro = CreateObject("imacros")
   iret = imacro.iimInit
   'Firefox iret = test.iimInit ("-fx")
   iret = imacro.iimDisplay("Submitting Data from Excel")
   totalrows = ActiveSheet.UsedRange.Rows.Count
   For row = 2 To totalrows
      'Set the variables
      iret = imacro.iimSet("Short-Name*", Cells(row, 1).Value)
      iret = imacro.iimSet("Acct-Cntr-Type*", Cells(row, 2).Value)
      iret = imacro.iimSet("Base-Ccy*", Cells(row, 3).Value)
      'Set the display
      iret = imacro.iimDisplay("Row# " + CStr(row))
      'Run the macro
      iret = imacro.iimPlay("test.iim")
      If iret < 0 Then
         MsgBox imacro.iimGetLastError()
      End If
   Next row
   iret = imacro.iimDisplay("Submission complete")
   iret = imacro.iimExit

End Sub

The error occurs at test = CreateObject("test") stating that test=empty.

Is there any code I am missing out?

I am running on Firefox 47.0 and iMacro for Firefox 8.9.7. I am also running on Windows 7.
Posts: 9
Joined: Wed Oct 04, 2017 3:05 am

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 1 guest