OptionButton with Bookmark text output

Joined
Jul 19, 2018
Messages
1
Reaction score
0
Hello, in UserForm, I have 2 option buttons for gender, they are in same groupname, how do I allow user to select back and forth on their option button without the text output accumulating? instead of OB1 should delete OB2 if previously selected?
Right now if you select the buttons more than 2 times you get 'malefemalemale' and does not remove the previous txt selection.

Private Sub OptionButton1_Click()
Dim GENDER As Range
Set GENDER = ActiveDocument.Bookmarks("GENDER").Range
GENDER.Text = "male"
End Sub

Private Sub OptionButton2_Click()
Dim GENDER As Range
Set GENDER = ActiveDocument.Bookmarks("GENDER").Range
GENDER.Text = "female"
End Sub

Thanks in advance, yes this is very basic.
 
Back
Top