W
Wim R.M. Dekeyser
Hi,
I have a number of scenarios that I need to perform some calculations on.
I am trying to keep the code short by having a for - next loop running
through all the scenarios.
I am not having much luck getting that to work, though.
Shouldn't the following work?
For intLooping = 1 To 20
Scenarios(intLooping).Show
Next
The following, on the other hand, does work (but doesn't do any good).
For intScenNr = 1 To 20
arrScenarios(intScenNr - 1) = Scenarios(intScenNr).Name
Next
MsgBox Scenarios(1).Name & " - to - " & Scenarios(6).Name
MsgBox arrScenarios(0) & " - to - " & arrScenarios(5)
Thanks for any ideas!
cheers,
wim
I have a number of scenarios that I need to perform some calculations on.
I am trying to keep the code short by having a for - next loop running
through all the scenarios.
I am not having much luck getting that to work, though.
Shouldn't the following work?
For intLooping = 1 To 20
Scenarios(intLooping).Show
Next
The following, on the other hand, does work (but doesn't do any good).
For intScenNr = 1 To 20
arrScenarios(intScenNr - 1) = Scenarios(intScenNr).Name
Next
MsgBox Scenarios(1).Name & " - to - " & Scenarios(6).Name
MsgBox arrScenarios(0) & " - to - " & arrScenarios(5)
Thanks for any ideas!
cheers,
wim