Dim i As Long
Dim ary
ReDim ary(Worksheets.Count - 1)
For i = 1 To Worksheets.Count
ary(i - 1) = Worksheets(i).Name
Next i
Worksheets(ary).Select
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"abxy " wrote in message
...
Hi all,
Is there anyway I can reference all sheets in the workbook, or either
all sheets in between (sheets that i've named) "Top" and "Bottom" using
the Worksheets() term in vba?
I know that i can use the Sheets(Array("Sheet1", "Sheet2", ...)) term
but that's not gonna fly in this case cause the work book is updated
daily and i can't reference specific sheets unless it's something like
every sheet between "this sheet" to "that sheet".
Thx :)
---
Message posted from http://www.ExcelForum.com/