MrHuge
Board Regular
- Joined
- Jun 23, 2005
- Messages
- 219
Hi Is there a way i can hide a column based on its named range from within VB.
What i have is
Column L is named C_PID.
Presently i do this
The Problem with this is if i insert a column before L then it hides the wrong column next time.
So i thought the best way would be to Hide it based on the Range Name which is C_PID
Is this possible, or am i going about this the wrong way?
Thanks
What i have is
Column L is named C_PID.
Presently i do this
Code:
Private Sub PID_C_Click()
If PID_C = True Then
Columns("L").EntireColumn.Hidden = False
Else
Columns("L").EntireColumn.Hidden = True
End If
End Sub
So i thought the best way would be to Hide it based on the Range Name which is C_PID
Is this possible, or am i going about this the wrong way?
Thanks