How do I find the currently selected Scenario?
hi, (?)
Maybe this is a simple thing, but I don't seem to be able to track it down.
I have an Excel sheet with a couple of Scenarios defined.
I am trying to implement some VBA functions where I need to know which Scenario is currently selected.
Does anyone know how I determine the active Scenario from VBA?
Any help will be greatly appreciated. Thanks in advance.
this code line returns a null string ("") if no scenario is active/selected/... or, the name of current scenario:
application.commandbars.findcontrol(id:=1737).text
hth,
hector.
|