I have a file that has several toggle buttons to hide various columns. Its been working great. Within the past few days they just quit working. No error message and nothing changed in the file. I have other VBA in the file that does some other functions and they are working fine. Just the Hide/Unhide columns not working.
Any ideas as to what is going on here?
Here is the code I'm using:
Private Sub ToggleButton1_Click() 'Hide Segment 1'
Dim xAddress As String
xAddress = "S:U"
If ToggleButton1.Value Then
Application.ActiveSheet.Columns(xAddress).Hidden = True
Else
Application.ActiveSheet.Columns(xAddress).Hidden = False
End If
End Sub
Any ideas as to what is going on here?
Here is the code I'm using:
Private Sub ToggleButton1_Click() 'Hide Segment 1'
Dim xAddress As String
xAddress = "S:U"
If ToggleButton1.Value Then
Application.ActiveSheet.Columns(xAddress).Hidden = True
Else
Application.ActiveSheet.Columns(xAddress).Hidden = False
End If
End Sub