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

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

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:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

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.
jinhui
 
Posts: 5
Joined: Wed Oct 04, 2017 3:05 am

Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests

cron
-->