Thread: Selected Sheets
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Glen Mettler[_4_] Glen Mettler[_4_] is offline
external usenet poster
 
Posts: 70
Default Selected Sheets

Just what I needed. Thanks

Glen

"Ron de Bruin" wrote in message
...
Try this if you only select worksheets and not chart sheets

Sub test()
Dim sh As Worksheet
For Each sh In ActiveWindow.SelectedSheets
MsgBox sh.Name
Next
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Glen Mettler" wrote in message
...
I have a workbook that contains 25 worksheets. Suppose I select sheets
12, 15, and 21
Is there a way - programmatically - to cycle thru the sheets collection
and identify which ones have been selected?

I can count the number of sheets selected with:
SelectedSheets = ActiveWindow.SelectedSheets.Count

but I can't seem to find where I can read which ones are selected.

Glen