![]() |
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 |
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 |
All times are GMT +1. The time now is 04:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com