View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default How to Create an array

Dim i as Long
ReDim arr(3 To ActiveWorkbook.Sheets.Count)
For i = 3 To UBound(arr)
arr(i) = i
Next
ActiveWorkbook.Sheets(arr).Printout

Assumes of course at least 3 sheets.

Regards,
Peter T

"JB" wrote in message
...
I think this is how I should do it ... but need to add sheets up to
Sheets.Count

Sheets(Array(3, 4, 5, 6)).PrintOut