Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Userform question. ingleg Excel Discussion (Misc queries) 1 July 6th 06 01:17 PM
userform question Peterke Excel Programming 0 March 25th 06 07:23 PM
Userform question David Goodall Excel Programming 1 May 16th 04 03:25 PM
userform question keyur Excel Programming 2 April 14th 04 04:49 PM
userform question Rob Bovey Excel Programming 0 August 25th 03 11:43 PM


All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"