Per Olander
02-02-2011, 05:15 AM
Hello,
I am trying to use the program iMacros to run multiple google map searches to create a distance matrix with 200 points - I can record the makro to do a specific search within iMacros, but when I use the code from their walk-through to use it from Excel with input, it comes with the error message:
"Run-time error 429
activeX component can't create object"
regarding the bold italic line in the code, which is as follows. This is written exactly as the walkthrough of iMacros, however this link talks about differences between 32 and 64 bit machines
wiki.imacros.net/x64
My computer is 32 bit, but I cannot understand what I am actually to correct to make it work - hopefully someone in here can help me!
Private Sub SøgIE()
Dim iim1, iret, row, totalrows
Set iim1 = CreateObject("imacros")
iret = iim1.iimInit
iret = iim1.iimDisplay("Submitting Data from Excel")
totalrows = ActiveSheet.UsedRange.Rows.Count
For row = 2 To totalrows
'Set the variables
iret = iim1.iimSet("FNAME", Cells(row, 1).Value)
iret = iim1.iimSet("LNAME", Cells(row, 2).Value)
'Set the display
iret = iim1.iimDisplay("Row# " + CStr(row))
'Run the macro
iret = iim1.iimPlay("GoogleMaps")
If iret < 0 Then
MsgBox iim1.iimGetLastError()
End If
Next row
iret = iim1.iimDisplay("Submission complete")
iret = iim1.iimExit
End Sub
I am trying to use the program iMacros to run multiple google map searches to create a distance matrix with 200 points - I can record the makro to do a specific search within iMacros, but when I use the code from their walk-through to use it from Excel with input, it comes with the error message:
"Run-time error 429
activeX component can't create object"
regarding the bold italic line in the code, which is as follows. This is written exactly as the walkthrough of iMacros, however this link talks about differences between 32 and 64 bit machines
wiki.imacros.net/x64
My computer is 32 bit, but I cannot understand what I am actually to correct to make it work - hopefully someone in here can help me!
Private Sub SøgIE()
Dim iim1, iret, row, totalrows
Set iim1 = CreateObject("imacros")
iret = iim1.iimInit
iret = iim1.iimDisplay("Submitting Data from Excel")
totalrows = ActiveSheet.UsedRange.Rows.Count
For row = 2 To totalrows
'Set the variables
iret = iim1.iimSet("FNAME", Cells(row, 1).Value)
iret = iim1.iimSet("LNAME", Cells(row, 2).Value)
'Set the display
iret = iim1.iimDisplay("Row# " + CStr(row))
'Run the macro
iret = iim1.iimPlay("GoogleMaps")
If iret < 0 Then
MsgBox iim1.iimGetLastError()
End If
Next row
iret = iim1.iimDisplay("Submission complete")
iret = iim1.iimExit
End Sub