View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default How to find No of sheets ,sheet no

Your have a couple of choices:

Dim i As Long

For i = 1 To ThisWorkbook.Worksheets.Count
Debug.Print ThisWorkbook.Worksheets(i).Name
Next

'or
Dim WS As Worksheet

For Each WS In ThisWorkbook.Worksheets
Debug.Print WS.Name
Next

NickHK

"Vadhimoo" wrote in message
...
Hi ,
Is there any option to find the no of sheets in the work book and any
possible to find the "sheets no" or sheets position

for example: In my workbook contains worksheets

Traffic2005,Customer,Tax2005,Mar 2006

Instead of using sheets name, i want to use the sheets's no
like
Traffic2005 - "1"
Customer- "2"
Tax2005-"3"
Mar 2006-"4"

Thanks in advance for your reply.

Have a nice day.