View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bill Renaud Bill Renaud is offline
external usenet poster
 
Posts: 417
Default selecting range over multiple sheets

Tanya: You shouldn't need to use a For loop to iterate through all of the
worksheets unhiding the columns. Select all of the sheets and unhide the
columns at once, just like you would if you record the code using the macro
recorder. Try the following code:

Worksheets(Array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11)).Select

With Worksheets(2)
.Activate
.Columns("D:O").Hidden = False
.Range("A1").Select

'Ungroup the worksheets.
.Select
End With

Sheets("Setup").Activate

--
Regards,
Bill Renaud