Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am looking for a macro that gives sheet names of w/book next to current
sheet. Suppose I place this macro in sheet 6 ,from sheet 7 to end of W/book sheet names be listed in this sheet 6 from range A2:A100.Any body Pl. try and post me. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Sub wsnames() Set r = Sheets(1).Range("a1") For i = 1 To Sheets.Count r.Cells(i, 1) = Sheets(i).Name Next i End Sub Because this code names all the sheets; You can alter the code to Sheet(6), and add; Range("A1:A6").Select Selection.ClearContents after Next i -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=520043 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
THANKS.very good idea.In last line I have added (instead of clearcontents)
selection.Delete Shift:= xlUp. "davesexcel" wrote: Sub wsnames() Set r = Sheets(1).Range("a1") For i = 1 To Sheets.Count r.Cells(i, 1) = Sheets(i).Name Next i End Sub Because this code names all the sheets; You can alter the code to Sheet(6), and add; Range("A1:A6").Select Selection.ClearContents after Next i -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=520043 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Possible Macro Timing Overrun generates Excel Exception | Excel Discussion (Misc queries) | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Highlight Range - wrong macro, please edit. | Excel Worksheet Functions | |||
Macro to link Sheets to main workbook | Excel Discussion (Misc queries) | |||
Macro for moving sheets | Excel Discussion (Misc queries) |