Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Running macros on ALL Excel tabs
Can I create a Macro and have it run on all tabs in the Excel workbook?
I have tried to do this by creating a macro and within the macro move from tab to tab. When I then run the macro, Excel promps me to debug at the very point that is should move onto the next tab. The macro itself is a simple one and only includes formatting, sorting, & subtotaling commands. The problem is I have 30+ reports each with 15+ tabs and need this macro to run on all tabs.... a very time consuming task if I have to run it tab by tab. Any help would be greatly appreciated! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Running macros on ALL Excel tabs
Something like this maybe:
Sub DoThisEachSht() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets 'Your code goes here Next ws End Sub "tbong" wrote in message ... Can I create a Macro and have it run on all tabs in the Excel workbook? I have tried to do this by creating a macro and within the macro move from tab to tab. When I then run the macro, Excel promps me to debug at the very point that is should move onto the next tab. The macro itself is a simple one and only includes formatting, sorting, & subtotaling commands. The problem is I have 30+ reports each with 15+ tabs and need this macro to run on all tabs.... a very time consuming task if I have to run it tab by tab. Any help would be greatly appreciated! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
why excel stops running?? | Excel Discussion (Misc queries) | |||
Excel 2000 with macros slows to write to W2k3/XP disk or shares | Excel Discussion (Misc queries) | |||
Anyone have troubles running 2003 macros in 2000 version of Excel | Excel Discussion (Misc queries) | |||
In Excel make the tabs a the bottom stack vertically. | Excel Discussion (Misc queries) | |||
can a workbook with macros created in excel 2003 work in excel 20. | Excel Discussion (Misc queries) |