Thread
:
Code not hiding columns
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Code not hiding columns
try
Sub hidecolf()
For Each ws In Sheets(Array("Sheet1", "Sheet2", "Sheet3"))
ws.Columns("F:F").EntireColumn.Hidden = True
Next ws
End Sub
--
Don Guillett
SalesAid Software
"Eva Shanley" wrote in message
...
I recorded the following code that should hide Col. F in
Sheets 1, 2, and 3. This works fine when I record, but
when I run the code manually Col. F hides on Sheet 1 only,
while the column is merely selected on Sheets 2 & 3. Any
idea what happens here? Thanks in advance!
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
Columns("F:F").Select
Selection.EntireColumn.Hidden = True
Sheets("Sheet1").Select
End Sub
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]