#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Looping

How do I perform the same set of command/functions on every worksheet in the
workbook without having to specify the worksheet names.
Must also work if I add or remove a sheet.

Thank you


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Looping

Hi Gusset

Dim sh as Worksheet
For Each sh In ThisWorkbook.Worksheets
'your code
Next sh

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Gusset Gadder" wrote in message ...
How do I perform the same set of command/functions on every worksheet in the
workbook without having to specify the worksheet names.
Must also work if I add or remove a sheet.

Thank you




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Looping


"Ron de Bruin" wrote in message
...
Hi Gusset

Dim sh as Worksheet
For Each sh In ThisWorkbook.Worksheets
'your code
Next sh



Brilliant !!

Thank you so much


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
Looping scottwilsonx[_54_] Excel Programming 0 October 5th 04 04:29 PM
Looping Louise[_4_] Excel Programming 1 September 10th 04 04:57 PM
Looping [email protected] Excel Programming 0 October 31st 03 07:47 PM
Looping Stuart[_9_] Excel Programming 0 October 29th 03 11:31 PM
Need Looping Help [email protected] Excel Programming 2 October 29th 03 08:11 PM


All times are GMT +1. The time now is 03:26 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"