Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default loop through a certain group of worksheets only

Hello all,

In a workbook with several worksheets, I need to adjust something in any
worksheet with a name beginning with "Day" (ie, process all worksheets like
"Day 1", "Day 2", etc.) I will not know how many "day" sheets there are.
Also, the file name will always be different.

What would be a simpler/effective loop that I could use for this and other
similar files?

Thanks!!
--
Chris M
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default loop through a certain group of worksheets only


dim wks as worksheet
dim wkb as workbook

set wkb = activeworkbook 'workbooks("name")/thisworkbook
for each wks in wkb.worksheets
if lcase(wks.name) like "day*" then
'do stuf
end if
next


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Chris M wrote :

Hello all,

In a workbook with several worksheets, I need to adjust something in
any worksheet with a name beginning with "Day" (ie, process all
worksheets like "Day 1", "Day 2", etc.) I will not know how many
"day" sheets there are. Also, the file name will always be different.

What would be a simpler/effective loop that I could use for this and
other similar files?

Thanks!!

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
I wish to group my worksheets under group tabs Art Excel Worksheet Functions 1 February 4th 10 09:37 PM
I wish to group my worksheets under group tabs CSI Excel Worksheet Functions 5 October 19th 06 09:25 PM
How do I group worksheets (Lotus 123 function is "Sheet>Group Shee jaking Excel Worksheet Functions 2 August 30th 05 02:09 PM
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 03:59 AM.

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

About Us

"It's about Microsoft Excel"