Thread: Sheets names
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
PeterAtherton PeterAtherton is offline
external usenet poster
 
Posts: 42
Default Sheets names

HI

Sub listSheets()
s = Sheets.Count
r = ActiveCell.Row: c = ActiveCell.Column
For i = 1 To s
Cells(r, c) = Sheets(i).Name
Cells(r, c + 1) = Sheets(i).Index
r = r + 1
Next
End Sub

Regards
Peter

"2007-User" wrote:

Hi Guys,

I need a VBA to sort all the sheet's names in a column,
Can this list be updated automatically In case I delete any sheets?

Can anyone please direct me to create such VBA?

Thanks in advance.