Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2015, 02:06 PM
Ellebb Ellebb is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2013
Novice
Vba that shows an error message for certain conditions
 
Join Date: Sep 2015
Posts: 4
Ellebb is on a distinguished road
Default Vba that shows an error message for certain conditions

Hi
I am new to word vba but wanted a little help.



I have a user form current with several forms of input including two label check boxes.

I would like if possible a vba that shows and error message if either both or neither of the boxes have been selected.

Any help would be appriciated

Thanks
Reply With Quote
  #2  
Old 09-21-2015, 08:29 PM
macropod's Avatar
macropod macropod is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The usual way on handling this kind of thing on a userform is to use grouped radio buttons, thus obviating the risk that none, or more than one, can be active. Is there a reason you can't do this?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-21-2015, 10:58 PM
Ellebb Ellebb is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2013
Novice
Vba that shows an error message for certain conditions
 
Join Date: Sep 2015
Posts: 4
Ellebb is on a distinguished road
Default

Hi, it could be an option to use a radio button. I have been requested to set a form up based on an old set up but want to put rules in place to make sure it won't let you do certain things, I.e check more than one box for same option and save without having completed certain parts of forms. This is all very new to me I'm more of a excel vba person!
Reply With Quote
  #4  
Old 09-21-2015, 11:08 PM
macropod's Avatar
macropod macropod is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Ellebb View Post
This is all very new to me I'm more of a excel vba person!
Excel userforms and Word userforms are the same regarding the use of checkboxes & radiobuttons.

Please clarify that this is a userform we're discussing and not a document being used as a form.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 09-21-2015, 11:09 PM
Ellebb Ellebb is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2013
Novice
Vba that shows an error message for certain conditions
 
Join Date: Sep 2015
Posts: 4
Ellebb is on a distinguished road
Default

Sorry, at the moment I believe that it is a document that is being set up as a form
Reply With Quote
  #6  
Old 09-21-2015, 11:17 PM
macropod's Avatar
macropod macropod is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, in that case you may not have access to option buttons. What kinds of controls are you proposing to use (e.g. content controls, formfields, ActiveX controls)?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 09-21-2015, 11:20 PM
Ellebb Ellebb is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2013
Novice
Vba that shows an error message for certain conditions
 
Join Date: Sep 2015
Posts: 4
Ellebb is on a distinguished road
Default

At the moment I believe I am using the label and active X buttons in the developer tab
Reply With Quote
  #8  
Old 09-21-2015, 11:24 PM
macropod's Avatar
macropod macropod is offline Vba that shows an error message for certain conditions Windows 7 64bit Vba that shows an error message for certain conditions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, in that case you have access to the ActiveX option buttons, which can be grouped as previously discussed. No VBA required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook gives an error message. daire.macadaim Outlook 0 03-20-2015 04:21 AM
Vba that shows an error message for certain conditions Automation error Unknown error" message once they open the Excel file hlina Excel 1 10-08-2013 09:14 PM
Vba that shows an error message for certain conditions Sr. Citizen Question, Please: WORD Shows Blank, But Notepad Shows "Gibberish" ? Robert11 Word 3 08-12-2013 12:35 PM
Error message White House Outlook 1 12-07-2010 04:52 AM
sent mail error message Carolemc Outlook 0 09-26-2006 03:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft