View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default using the Excel generic worksheet names instead of user-given names in code

Paul

Here's handy little macro to get a list of sheetnames and codenames.

Sub CreateListOfSheetsOnFirstSheet()
Dim ws As Worksheet
For I = 1 To Worksheets.Count
With Worksheets(1)
Set ws = Worksheets(I)
.Cells(I, 1).Value = ws.Name
.Cells(I, 2).Value = ws.CodeName
End With
Next I
End Sub


Gord Dibben MS Excel MVP

On Fri, 26 Jun 2009 11:03:48 -0700, "Paul" wrote:

Many thanks to Mike, Ron and Jim!

You've given me all the information I need to handle the worksheets the way
I want.

Jim - Thanks also for the sample code with the Select Case examples.

Paul