In Excel, I can use ctrl+click on the worksheet tabs to select multiple worksheets.
How can I refer to the collection of selected worksheets?
I would like to write:
For Each ws In Worksheets.Selection
[....]
Next
Of course, that does not work.
Alternatively, if I cycle through the collection of Worksheets, how can I detect a selected worksheet?
I would like to write:
For Each ws In Worksheets
If ws.Selected Then
[....]
EndIf
Next
Of course, that does not work.
How can I refer to the collection of selected worksheets?
I would like to write:
For Each ws In Worksheets.Selection
[....]
Next
Of course, that does not work.
Alternatively, if I cycle through the collection of Worksheets, how can I detect a selected worksheet?
I would like to write:
For Each ws In Worksheets
If ws.Selected Then
[....]
EndIf
Next
Of course, that does not work.