Consulting

Results 1 to 3 of 3

Thread: Using iMacros in a loop with input from Excel

  1. #1

    Using iMacros in a loop with input from Excel

    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

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Possibly it's the Killbits that's doing it

    http://en.wikipedia.org/wiki/Killbit


    You can try to see if this works

    1. Using Regedit, search

    [VBA]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID]
    [/VBA]

    to see if iMarcos has a Class ID. It should look something like

    {6262D3A0-531B-11CF-91F6-C2863C385E30}


    2. Then look in

    [VBA]
    "HKLM\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{6262D3A0-531B-11CF-91F6-C2863C385E30}\Compatibility Flags"
    [/VBA]

    using the GUID you found from #1 of course

    3. If it's there, then make the REG_DWORD = 0

    Standard "Modify the Registry" cautions apply:

    a. Be careful; very, very careful
    b. Exxport a Reg file of anything you're about to change so that you can restore it (right click, Export)

    Hope this works, it's how I make the MS Grid Control usable in Excel

    Paul

  3. #3
    Hi Paul, thanks for the reply!

    I have managed to locate the GUID and found the same number as you suggested - Is it just the exact number I need to locate, or how do I check that it is the correct number for iMacros? I must note that I am not used to doing these kind of things on a computer, I am relatively new to VBA as my first code language, and have almost only used it within Excel.

    I have set REG_DWORD = 0, but the same error message in Excel keeps occurring.

    what about the fact that I am running 32bit instead of 64?

    hopefully you have some further advice,

    Kind Regards, Per

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •