Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Checkbox in an If statement
Upon saving, I'm trying to show a messagebox when none of the 4 checkboxes in
the document are checked and to cancel saving. I'm using checkboxes from the control toolbox. It's giving me an error on the If statement called: Run-time error '424". Object required. This is the code that I'm using: Sub FileSaveAll() If ChkboxTMS1.Value = False And ChkboxTMS2.Value = False And ChkboxTMS3.Value = False And ChkboxTMS4.Value = False Then MsgBox "Please select a radiobutton and retype your changes." Exit Sub Else Documents.Save End If End Sub Any thoughts? Thank you |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Checkbox in an If statement
Hi JuanManuel,
Upon saving, I'm trying to show a messagebox when none of the 4 checkboxes in the document are checked and to cancel saving. I'm using checkboxes from the control toolbox. It's giving me an error on the If statement called: Run-time error '424". Object required. In which module is this code located? I think, the way it's set up, it would have to be in the ThisDocument module to access the activeX controls in this manner. This is the code that I'm using: Sub FileSaveAll() If ChkboxTMS1.Value = False And ChkboxTMS2.Value = False And ChkboxTMS3.Value = False And ChkboxTMS4.Value = False Then MsgBox "Please select a radiobutton and retype your changes." Exit Sub Else Documents.Save End If End Sub Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checkbox | Microsoft Word Help | |||
which statement right , question is Choose the correct statement? | Microsoft Word Help | |||
which statement right , question isChoose the correct statement? | Microsoft Word Help | |||
Checkbox | Microsoft Word Help | |||
Checkable checkbox | Microsoft Word Help |