I have a checkbox in a userform (simply a do not show again) but it doesn't seem the value is being stored.
I created a userform (Userform1) added a checkbox (Checkbox1)
I put this in code to test
Private Sub CheckBox1_Click()
If UserForm1.CheckBox1.Value = True Then
MsgBox "Checkbox has Checked", , "Checkbox"
Else
MsgBox "Checkbox has UnChecked", , "Checkbox"
End If
End Sub
The msgbox do work when I check and uncheck it.
However that value doesn't seem to save so if I check it and reopen the box it's always unchecked therefore if I use an If Userform1.Checkbox1.value = True statement it doesn't work because after I check it and close the form next time I open it it is not checked again.
My test code
Sub test()
If UserForm1.CheckBox1.Value = False Then
UserForm1.Show
Else
End If
End Sub
Works but everytime I run test macro the CheckBox value is reset to false (even if I click the box it doesn't change value to true)
I must be missing a step?
Bookmarks