Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default SELECTED SHEETS' NAMES

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

Faraz
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default SELECTED SHEETS' NAMES

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide all sheets but selected sheets - an example [email protected] Excel Programming 1 April 7th 06 06:29 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Programming 6 March 29th 06 12:43 PM
Passing Selected Sheets' Names to a Macro John Tjia Excel Programming 5 December 24th 03 04:36 PM
Worksheet Selected Names Juraj[_2_] Excel Programming 2 October 27th 03 11:09 AM


All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"