View Single Post
 
Old 03-30-2019, 08:08 PM
matapagi2019 matapagi2019 is offline Windows XP Office 2007
Novice
 
Join Date: Mar 2019
Posts: 12
matapagi2019 is on a distinguished road
Default The Word userform checkbox (checked/unchecked) is not saved on the Application Quit

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.
Reply With Quote