View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default SELECTED SHEETS' NAMES

Dim sh As Worksheet
Dim NextRow As Long
NextRow = 1
Worksheets(1).Columns(1).ClearContents
For Each sh In ActiveWindow.SelectedSheets
Worksheets(1).Cells(NextRow, "A").Value = sh.Name
NextRow = NextRow + 1
Next sh


--
__________________________________
HTH

Bob

"Faraz A. Qureshi" wrote in
message ...
I have found a code like:

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

However, how to have the same names be placed at the very first available
cells in the first sheet?
--
Best Regards,

Faraz


"Faraz A. Qureshi" wrote:

What looping code would display dialog boxes, one after the other,
displaying
the names of the Sheets which are selected/grouped?
--
Best Regards,

Faraz