Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default run macro on all sheets in workbook after specific sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default run macro on all sheets in workbook after specific sheet


Sub loopthroughanddo()
For Each sh In ThisWorkbook.Sheets
if Ucase(sh.name) < "MASTER DATA" THEN
call fildownid
End If
Next
End Sub


"J.W. Aldridge" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select specific sheets and copy to new workbook jeremiah Excel Programming 2 January 28th 09 04:08 PM
Renaming all sheets in a workbook according to a specific cell. lau_ash[_2_] Excel Programming 0 February 12th 07 06:46 PM
Print sheets by "All Sheets in workbook, EXCEPT for specific named sheets". Possible? Corey Excel Programming 2 December 11th 06 01:35 AM
Copy specific Sheets and save them as a workbook Rock* Excel Programming 2 March 13th 06 08:28 PM
Finding specific sheets within a workbook Roy Excel Discussion (Misc queries) 2 August 23rd 05 06:40 PM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"