Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform change question
I have a UserForm on which I have placed an OptionButton Group (Mr, Mrs, Ms,
Dr) and OptionButton Group (Male, Female). What I would like to have happen is that when I select Mr, Male OptionButton becomes true, Mrs or Ms, Female becomes true. If Dr is selected I want nothing to happen and then the user will select the correct gender. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform change question
Hi Patrick
Try something like: '============= Private Sub optMR_Click() optMale.Value = True End Sub '--------------- Private Sub optMRS_Click() OptFemale.Value = True End Sub '--------------- Private Sub optMS_Click() OptFemale.Value = True End Sub '--------------- Private Sub optDR_Click() optMale = False OptFemale = False End Sub '<<============= --- Regards, Norman "Patrick C. Simonds" wrote in message ... I have a UserForm on which I have placed an OptionButton Group (Mr, Mrs, Ms, Dr) and OptionButton Group (Male, Female). What I would like to have happen is that when I select Mr, Male OptionButton becomes true, Mrs or Ms, Female becomes true. If Dr is selected I want nothing to happen and then the user will select the correct gender. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform change question
Similarly, you could try this:
Private Sub obMr_Change() If obMr = True Then obMale = True Else obMale = False End Sub Private Sub obMrs_Change() If obMrs = True Then obFemale = True Else obFemale = False End Sub Private Sub obMs_Change() If obMs = True Then obFemale = True Else obFemale = False End Sub -- Jay "Patrick C. Simonds" wrote: I have a UserForm on which I have placed an OptionButton Group (Mr, Mrs, Ms, Dr) and OptionButton Group (Male, Female). What I would like to have happen is that when I select Mr, Male OptionButton becomes true, Mrs or Ms, Female becomes true. If Dr is selected I want nothing to happen and then the user will select the correct gender. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Another Userform question. | Excel Discussion (Misc queries) | |||
userform question | Excel Programming | |||
Userform question | Excel Programming | |||
userform question | Excel Programming | |||
userform question | Excel Programming |