Hi Guys..., I have this code below. If I push first button the value 1 is saved to the cell E3, if I push second button the value 1 is saved to the cell E6 and value from cell E3 is deleted and first button is in default state. This everything is fine. But I need to modify this script below as follow: If first or second button is pushed and value is saved to the given cell I want to forbid the second clicking option when the button could be switched to the default. The button will be switched to default state upon other button is pushed. Almost it is reached in this script but I dont know how to prohibit the second click option on the already pushed button. Thanks in advance!
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
Range("E3") = 1
ToggleButton1.BackColor = RGB(0, 255, 0)
ToggleButton2.Value = False
Else: ToggleButton1.BackColor = RGB(255, 0, 0)
Range("E3") = ""
Private Sub ToggleButton2_Click()
If ToggleButton2.Value = True Then
Range("E6") = 1
ToggleButton2.BackColor = RGB(0, 255, 0)
ToggleButton1.Value = False
Else: ToggleButton2.BackColor = RGB(255, 0, 0)
Range("E6") = ""