II s there a better way to clean up the code below?
When command button 1 is clicked, commandbutton 2-4 and togglebutton 1 should be turned off (false).
When command button 1 is clicked, commandbutton 2-4 and togglebutton 1 should be turned off (false).
Code:
Private Sub CommandButton1_Click()
With ToggleButton1
If .Enabled = True Then .Enabled = False Else .Enabled = True
End With
With CommandButton2
If .Enabled = True Then .Enabled = False Else .Enabled = True
End With
With CommandButton3
If .Enabled = True Then .Enabled = False Else .Enabled = True
End With
With CommandButton4
If .Enabled = True Then .Enabled = False Else .Enabled = True
CommandButton1.Caption = .Enabled
End With
If ActiveCell.Row > 354 Then
Application.Goto Reference:=Worksheets("Calls").Range("A316")
ElseIf ActiveCell.Row <= 354 Then
Application.Goto Reference:=Worksheets("Calls").Range("A354")
End If
End Sub