Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default 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
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
Loop worksheets merry_fay Excel Discussion (Misc queries) 2 January 7th 09 01:54 PM
For Each...won't loop through worksheets Bill G[_4_] Excel Programming 3 November 1st 06 07:53 PM
Loop thru some worksheets Mike Fogleman Excel Programming 2 August 21st 05 12:22 AM
Loop Through worksheets Stephen[_9_] Excel Programming 5 April 20th 04 01:46 PM
Loop worksheets Steve[_35_] Excel Programming 3 November 25th 03 04:46 AM


All times are GMT +1. The time now is 10:29 AM.

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

About Us

"It's about Microsoft Excel"