I am trying to have the following optionbutton value changed to false if the answer to a messanger box is no. For some reason I cannot get the value to change to false.
Code:
Private Sub CommandButton1_Click()
If OptionButton1.value = True Then
ans = MsgBox("Are you sure that you want to delete this item?", vbYesNo, "Delete")
If ans = vbYes Then
Rows(fA).Delete
Unload Me
End If
Exit Sub
If ans = vbNo Then
UserForm1.OptionButton1.value = False
Exit Sub
End If
End If
Call complete
End Sub