View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OJ[_2_] OJ[_2_] is offline
external usenet poster
 
Posts: 111
Default Scroll thru multiple spreadsheets

Well, its a bit vague your question but i would suggest that scrolling
through by name is one of the least efficient ways...

Try one of these...

''This one will loop through all Worksheets in a workbook
Dim objSht as Sheet
For each objSht in ThisWorkbook.Worksheets
.....yuor code here
Next objSht

But, if you have Chart sheets as well and you want to loop through them
as well as worksheets then you need to take a slightly different
approach I think...

Dim intShtCount As Integer
For intShtCount = 1 To ThisWorkbook.Sheets.Count
'''Your code here
Next intShtCount


Hth,
OJ