View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
davesexcel
 
Posts: n/a
Default Macro for part of W/book sheets


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