1 Like
Hi,
I'm trying to export all the scenarios to excel using the code below:
For s = 3 To L.Scenarios.MaxID
Worksheets("Sheet1").Range("C1").Offset(m1, t1) = L.Scenarios(s).Name
t1 = t1 + 1
Next
But using the "L.Scenarios.MaxID" it's not working. Then, I need to manually enter the number of scenarios that I have. Is there a way to make it smarter?
I have 8 scenarios in my model, but when I print the value of L.Scenarios.MaxID it returns me 11. The program works well until the 8th item.
Thank you!