View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
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!!