Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
That did the trick! As always, thanks again for your help. Bob "Bob Phillips" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Retrieving Data Range for Chart | Excel Programming | |||
Retrieving Data: Speed of beating down rows vs retrieving from array? | Excel Programming | |||
Retrieving comment using range name | Excel Discussion (Misc queries) | |||
Retrieving range string from named range | Excel Programming | |||
Retrieving the SQL query of the external data range | Excel Programming |