The_Steward
Board Regular
- Joined
- Nov 26, 2020
- Messages
- 63
- Office Version
- 365
- Platform
- Windows
I am using select change to change column width and remove text but when I click a different cell it unhides my hidden column that I put my hyperlinks in. Why is this happening?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address = "$G$12" Then
Target.Columns.ColumnWidth = 50
Else
Columns.ColumnWidth = 15
End If
If Target.Count > 1 Then Exit Sub
If Target.Address = "$G$12" Then
Target.Cells.Value = ""
End If
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address = "$G$12" Then
Target.Columns.ColumnWidth = 50
Else
Columns.ColumnWidth = 15
End If
If Target.Count > 1 Then Exit Sub
If Target.Address = "$G$12" Then
Target.Cells.Value = ""
End If