Apply Macro to all worksheets in a workbook except one

  • Thread starter Carrie_Loos via OfficeKB.com
  • Start date
C

Carrie_Loos via OfficeKB.com

Is there a way to include an exception to this macro so that it excludes
Sheet1??

Sub Apply_to_all_sheets()

For Each ws In Worksheets
Call Begin
Next
End Sub

Thanks for any help
Carrie
 
G

Gary''s Student

Sub Apply_to_all_sheets()
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name = "Sheet1" Then
Else
Call begin
End If
Next
End Sub
 
L

Luke M

Sub Apply_to_all_sheets()

For Each ws In Worksheets
If ws.name = "Sheet1" then goto xSkip
Call Begin
xSkip:
Next
End Sub
 
T

Tom Hutchins

Try

For Each ws In Worksheets
If ws.Name <> "Sheet1" Then
Call Begin
End If
Next

Hope this helps,

Hutch
 
Top