Retrieving value from range name
ActiveSheet.Columns(Range("First_Column_To_Hide"). Value &
":BE").EntireColumn.Hidden = True
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Bob" wrote in message
...
I have a one-cell range on "Sheet1" named "First_Column_to_Hide". The
value
of "First_Column_to_Hide" is always a column address. Is there a way I
can
"retrieve" the value from "First_Column_to_Hide" to substitute for the
"ZZZ"
(placeholder) in the code segment below?
Sub HideUnhideColumns()
Application.ScreenUpdating = False
ActiveSheet.Columns("N:BE").EntireColumn.Hidden = False
ActiveSheet.Columns("ZZZ:BE").EntireColumn.Hidden = True
Application.ScreenUpdating = True
End Sub
I would appreciate any help on this. Thanks.
|