Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving through worksheets and enacting formatting macro
Hi,
I have a macro assigned to the CommandButton1 on each worksheet starting on the sixth worksheet and going until the last tab of my workbook. In each instance, the macro does the same procedure, but only acting on the worksheet to which it is attached. How do I move through these worksheets one-at-a-time and enact the macro button? The procedure that is assigned to this button is called "formatting" and deals with formatting my pivot tables. I've tried other more efficient methods, but they seem to only act on my summary sheet and not move through my workbook. Here is the code that I've come up with thus far: Dim pt As PivotTables Dim sh As Worksheet For Each ws In sh.PivotTables With pt Call Formatting(pt) End With Next ws What am I doing wrong? Thanks in advance, Kent. -- Kent Lysell Financial Consultant Ottawa, Ontario W: 613.948-9557 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving conditional formatting between worksheets | Excel Discussion (Misc queries) | |||
Moving Between worksheets | Excel Programming | |||
moving a row between worksheets | New Users to Excel | |||
Moving between Worksheets | Excel Programming | |||
Moving worksheets | Excel Programming |