-
Hi all.
I have 2 options buttons (a control array) in a frame. When you display the form, neither button is selected. When you click on 1 button, it becomes selected of course.
Is there a way to de-select both buttons after 1 of them has been selected? In other words de-select both buttons (make them False) like they are when the form is initially displayed, after giving 1 of them a value of True by clicking on it? It seems like you can only change which one is selected, but not de-select both.
I hope you all understand what I'm trying to do.
Thanks for any help.
-
Try:
Code:
Private Sub Option1_Click(Index As Integer)
If Index = 0 Then
Option1(0).Value = False
Option1(1).Value = False
End If
End Sub
-
<?>
'no need to click on 1 to clear 2
Code:
Private Sub Option1_Click(Index As Integer)
If Index = 0 Then
MsgBox "Number 1 and still false" 'your code
Option1(0).Value = False
Option1(1).Value = False
Else
MsgBox "Number 2 and still false" 'your code
Option1(0).Value = False
Option1(1).Value = False
End If
End Sub
-
Thanks Megatron.
Even though I didn't want the value to change on the click event of one of the Option buttons, your code helped me figure out what I was doing wrong. :)
HeSaidJoe, I just saw your post. Thanks for replying. I figured it out.