run macro on all sheets in workbook after specific sheet

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

for all sheets that are after master data worksheet, run macro
"fildownid"

Sub loopthroughanddo()
x = Sheets("master data").Index
For Each sh In ThisWorkbook.Sheets
If sh.Index > x Then
Application.Run "fildownid"
End If
Next
End Sub
 
Sub loopthroughanddo()
For Each sh In ThisWorkbook.Sheets
if Ucase(sh.name) <> "MASTER DATA" THEN
call fildownid
End If
Next
End Sub
 
Back
Top