View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Skipping a tab when with this macro

You could do this:-
Sub nnn()
For Each ws In Worksheets
i = i + 1
If ws.Name = ("Sheet1") Then
i = i - 1
GoTo 100
End If
Cells((i + 3), 1) = ws.Name
100
Next
End Sub

Mike


"Kai Cunningham" wrote:

I am currently using this macro to populate a column with the names of each
tab I have in a workbook. I would like to be able to exclude a tab when this
macro runs. If the tab name is Sheet1, how would I exclude it from showing
up in my column?

For Each ws In Worksheets
i = i + 1
Cells((i + 3), 1) = ws.Name
Next

Thanks for your time!
-Kai