547 Views
Hello. I am trying to extract result data from LEAP into Excel using the LEAP API in Excel VBA. For various reasons, I cannot use the inbuilt script editor.
I have some trouble getting started. I am trying to follow the guide at http://www.energycommunity.org/WebHelpPro/API/Exploring.htm, but all I get for my troubles are errors.
I have added the "LEAP API" object in References in VBA tools, successfully ran "Set L = createobject("LEAP.LEAPApplication")" for working with LEAP objects in the immediate window.
However, I am running into trouble as soon as I try to set LEAP to the Analysis view (L.View = "Analysis"), getting the error: "Run-time error 348: Object doesn't support this property or method".
I have another error for when I am trying to make LEAP calculate. Trying L.Calculate creates an "Error 450: Wrong number of arguments or invalid property assignment". Calculate in the Objects library is set as a Sub, which I do not understand the implication of.
I am new to using Objects this way in VBA and have no Google (China), so does anyone have experience in this?
- Gregers