Computer Forum Forum Index
Register  FAQ Profile Log in to check your private messages Log in Register 

Radio Buttons

 
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba beginners
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Mon Nov 05, 2007 11:24 am    Post subject: Radio Buttons Reply with quote

Hi there,

Please could some one help me with some code to say if this set of
radio of buttons is not selected then please do so.

thanks

Matt
Back to top
Google
Sponsor





PostPosted: Mon Nov 05, 2007 11:24 am    Post subject: Advertisement

Back to top
Greg Maxey
Guest





PostPosted: Mon Nov 05, 2007 12:41 pm    Post subject: Re: Radio Buttons Reply with quote

Assuming these option buttons are in a Userform then code something like
this in in your command button code:
Private Sub CommandButton1_Click()
Select Case True
Case Me.OptionButton1
Case Me.OptionButton2
Case Me.OptionButton3
Case Else
MsgBox "Please select an option button"
Exit Sub
End Select
'Rest of your command button code
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


matthew.rodwell@luptonfawcett.com wrote:
Quote:
Hi there,

Please could some one help me with some code to say if this set of
radio of buttons is not selected then please do so.

thanks

Matt
Back to top
Guest






PostPosted: Mon Nov 05, 2007 3:52 pm    Post subject: Re: Radio Buttons Reply with quote

Thanks for this worked perfectly thankyou...

my second part is i have written this code before but i would also
like it to pop up if this hasn't been ticked or data had not been
written in to the box..
Private Sub optu3m_change()
txtover3m.Enabled = False = optu3m
Label50.Enabled = False = optu3m
End Sub

Above is the code i mean for the tick box so it desables the text box
but i what a messafe to pop up if neither these are used.

..i would also then like it to go back to the place in the screed
design where it was...(say i have 3 pages and this question was on
page 2 but obvouisly u finish on page 3)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Computer Forum Forum Index -> microsoft word vba beginners All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Computer Forum