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
How to keep ChBoxDisplay Checked or unchecked when Ms Word Quit?
All help is highly expected and I am very grateful.