Great, thanks Taylor. Just to follow up -
So currently my VBA code is as follows:
Sub ChangingModelAssumptions()
Set L = CreateObject("LEAP.LEAPApplication")
L.ActiveArea = "Dar es Salaam and Lusaka"
L.ActiveRegion = "Lusaka"
L.ActiveView = Analysis
L.ActiveScenario = "Current Accounts"
'Changing electrification rate
'L.Branch("Demand\Urban Households\Electrified Households").Variable("Activity Level").Expression = Sheets("InputDataDar").Range("B20").Value
'Changing travel distance
L.Branch("Key\Average Trip Distance").Variable("Activity Level").Expression = Sheets("InputDataDar").Range("B10").Value
End Sub
My question is: how do I print results from say 100 simulations to excel, using randomly generated inputs to cell B20 and B10 in my worksheet? I would also like to analyze results directly within Crystal Ball. I know Charles Heaps has mentioned previously that this is possible using a few lines of VBA code. Would you be able to share some example code to do this?
Thank you!