![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
In Ms Word, I need a form that contains a Checkbox (ChBoxDisplay) and a Button (BtnExit). If ChBoxDisplay is checked the Userform1.hide, and if it is not checked the Userform1.show.
In the code below, when ChBoxDisplay is checked, and then the MS Word application exits by the Application.Quit command, the checkbox on ChBoxDisplay is not saved. Code:
Private Sub BtnExitl_Click()
Application.Quit SaveChanges:=True
End Sub
Private Sub Document_Open()
If UserForm1.ChBoxDisplay.Value = True Then
UserForm1.Hide
Else
UserForm1.Show
End If
End Sub
All help is highly expected and I am very grateful. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBA in Word 2010 to show certain text only when a YES checkbox is checked | kdsim | Word VBA | 0 | 05-16-2018 05:16 AM |
Merged Checkbox Fields Always Checked
|
pdxplorer | Mail Merge | 11 | 12-20-2017 12:37 PM |
| Checkboxes are unchecked in Listbox that were checked off before.How can I stop this? | Rochelle711 | Excel Programming | 0 | 06-22-2014 06:16 PM |
Checkbox on Userform result in Text in Word
|
Dolfie_twee | Word VBA | 1 | 06-22-2010 07:54 AM |
| Excel 2003 will not terminate with application.quit | Peter Schellenbach | Excel | 12 | 03-14-2006 05:28 PM |