#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default FOR EACH

hello

i would like to loop some code for sheets 3 to 17 of a
workbook, but I'm not really sure of the syntax? Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default FOR EACH

Greg,

Try something like

Dim Ndx As Long
Dim WS As Worksheet
For Ndx = 3 To 17
Set WS = Worksheets(Ndx)
' do something with WS
Next Ndx

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"GREGORY" wrote in message
...
hello

i would like to loop some code for sheets 3 to 17 of a
workbook, but I'm not really sure of the syntax? Any ideas?



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



All times are GMT +1. The time now is 11:31 PM.

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"