LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default for each sheet in workbook

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
 
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
Help needed: Getting all sheet setup data from one workbook toanother workbook Lostguy Excel Programming 1 July 8th 08 02:43 PM
Copy rows from multiple workbook into a different workbook (sheet) Yossy Excel Programming 19 May 11th 08 12:34 AM
Copying data from workbook/sheets to another workbook/sheet yukon_phil Excel Programming 0 July 26th 06 07:33 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM


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

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

About Us

"It's about Microsoft Excel"