I don't know about the one line solution, but here's one way:
Sub test()
Dim wks As Worksheet
For Each wks In Sheets(Array("Sheet1", "Sheet2"))
wks.Range("A:A").EntireColumn.Hidden = True
Next
End Sub
--
Rob van Gelder -
http://www.vangelder.co.nz/excel
"norika " wrote in message
...
Selecting 'Group Sheet' and hide column using VBA.
Sheets(Array("sheet1", "sheet2", "sheet3")).Select
Sheets("sheet1").Activate
Range("A:A,D:F,J:J,N:O").Select
Selection.EntireColumn.Hidden = True
The result was only "Sheet1" can hide the column, the other cannot.
Any ideas?
Norika
---
Message posted from http://www.ExcelForum.com/