View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jacqui[_2_] jacqui[_2_] is offline
external usenet poster
 
Posts: 30
Default For Each statement


The following code only hides the columns for the first
sheet even though all sheets in the array aSheets are
selected. Do I need to activate each sheet to get it to
work? If so how would I code the For Each statement. Any
help is appreciated.
Many thanks
Jacqui

ThisWorkbook.Sheets(aSheets).Select
Range("A1").Select
iCCount = ActiveSheet.Range("IV7").End
(xlToLeft).Column

For i = 2 To iCCount
Selection.Offset(0, i).EntireColumn.Hidden
= False
Next