Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop Thru Worksheets
Hello
I have a workbook with several worksheets that contain the same rows and same colums that I run a macro on each sheet one sheet at a time the macro does the same thing to each sheet It works just fine . All I need is to have the Macro run on every sheet in the workBook I know it can be done but I cant get anything to work for Me. Can anyone Help me with something I can use to loop thru the worksheets? Thanks OKE DOKE |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop Thru Worksheets
for each ws in sheets
msgbox ws.name next ws -- Don Guillett SalesAid Software "Tinkerbell" wrote in message oups.com... Hello I have a workbook with several worksheets that contain the same rows and same colums that I run a macro on each sheet one sheet at a time the macro does the same thing to each sheet It works just fine . All I need is to have the Macro run on every sheet in the workBook I know it can be done but I cant get anything to work for Me. Can anyone Help me with something I can use to loop thru the worksheets? Thanks OKE DOKE |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop Thru Worksheets
Tinkerbell,
Sub test() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ' your code here Next ws End Sub hth, Doug "Tinkerbell" wrote in message oups.com... Hello I have a workbook with several worksheets that contain the same rows and same colums that I run a macro on each sheet one sheet at a time the macro does the same thing to each sheet It works just fine . All I need is to have the Macro run on every sheet in the workBook I know it can be done but I cant get anything to work for Me. Can anyone Help me with something I can use to loop thru the worksheets? Thanks OKE DOKE |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop worksheets | Excel Discussion (Misc queries) | |||
For Each...won't loop through worksheets | Excel Programming | |||
Loop thru some worksheets | Excel Programming | |||
Loop Through worksheets | Excel Programming | |||
Loop worksheets | Excel Programming |