View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default for each sheet in workbook

Why not just use the name

If sh.name<"master data" Then

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"J.W. Aldridge" wrote in message
...
how to perform macro on each sheet in workbook.
(except first worksheet = "master data")

I've tried the subs below but only worked on one sheet.

Public Sub DoToAll()
Dim ws As Worksheet
For Each ws In Worksheets
Application.Run "filldown"
Next
End Sub

Sub loopthroughanddo()
x = Sheets("master data").Index
For Each sh In ThisWorkbook.Sheets
If sh.Index x Then
Application.Run "filldown"
End If
Next
End Sub