• 622 views | 3 messages Discussion: LEAP
    Topic: LEAP 64 cannot run from Excel VBA Subscribe | Previous | Next
  • Gregers Larsen 9/12/2018

    Hello LEAP people!

    As I got LEAP64 to work with scripting I was trying to run a simple test script from Excel VBA. However, the simple start:

    Sub LEAPTest()

    Dim L As LEAPApplication

    Set L = CreateObject("LEAP.LEAPApplication")
    End Sub

    ... does not work. I get the run time error 429; "ActiveX component can't create object".

    Googling this, it seems the LEAPApplication is no longer valid on 64-bit, despite my LEAP API reference is still a valid file. What can I do to fix this? My test script worked in 32-bit versions earlier.


    Gregers

    Update: When I try to run any of "Common scripts" in LEAP, these also fail, as soon as they have to read data from LEAP itself. I think the LEAP.Application is trying to reference the 32-bit LEAP maybe?

    I get the error in LEAP for all of them as shown in the attachment


    LEAP script error.PNG
  • Taylor Binnington 10/30/2018
      Best Response

    Hi Gregers - sorry for the wait.

    Try this:
    1. To eliminate variables, make sure you have only the 64-bit version installed (make sure the 32-bit version is uninstalled).
    2. Manually run the file C:\Program Files\LEAP\registerLEAP.bat
    3. Verify that LEAP is properly registered by checking Help: About LEAP, from the main menu. You should find a line that says "Registered correctly in Windows Registry: Yes".
    4. Try running something simple in the built-in Script Editor (try something basic like "print LEAP.Branches.Count"). Let us know what happens.
    5. Return to your VBA in Excel example, and ensure that the LEAP API reference is enabled (Tools: References, make sure LEAP API is checked).
    6. With LEAP not already running, execute your script. Let us know what happens.
    7. Next, with the 64-bit version already running, executing your script after replacing
      Set L = CreateObject("LEAP.LEAPApplication")
      with
      Set L = GetObject(, "LEAP.LEAPApplication")
      Let us know what happens.
    Thanks,
    Taylor

  • Gregers Larsen 11/1/2018
      Best Response

    Thanks Taylor! It finally works now, though I have a comment to number (2) of the list. Not sure what the error was, but it's good now. Before I did it I deleted and reinstalled everything related to LEAP on my PC.

    Try this:
    1. To eliminate variables, make sure you have only the 64-bit version installed (make sure the 32-bit version is uninstalled).
      Check
    2. Manually run the file C:\Program Files\LEAP\registerLEAP.bat
      I couldn't actually do this from my user. The .bat file requires the password from an account called "Administrator" and not just the user with admin privileges.
      I had activate the hidden Administrator account (method here: https://www.ghacks.net/2014/11/12/how-to-enable-the-hidden-windows-10-administrator-account/, I used Local Users and groups methods, scroll down to find it)
      After activating the hidden Admin account, I set a password for it. That worked in the .bat file.
      I suggest you let any account with admin privileges work, as it otherwise can be very difficult for other users.
    3. Verify that LEAP is properly registered by checking Help: About LEAP, from the main menu. You should find a line that says "Registered correctly in Windows Registry: Yes".
      Check
    4. Try running something simple in the built-in Script Editor (try something basic like "print LEAP.Branches.Count"). Let us know what happens.
      Worked, but only tested after I fixed no. 2
    5. Return to your VBA in Excel example, and ensure that the LEAP API reference is enabled (Tools: References, make sure LEAP API is checked).
      Works now
    6. With LEAP not already running, execute your script. Let us know what happens.
      Check
    7. Next, with the 64-bit version already running, executing your script after replacing
      Set L = CreateObject("LEAP.LEAPApplication")
      with
      Set L = GetObject(, "LEAP.LEAPApplication")
      Let us know what happens.
      Didn't work with GetObject, but CreateObject works now.
    Thanks,
    Gregers