CheckBox check marks save

  • Thread starter Thread starter p. panter
  • Start date Start date
P

p. panter

I had genrated a "UserForm" with some "CheckBox". Now I would like to save
the document with some check mark's (true, on) but always when I open again
the document there are no check marks visible.

Here is the code that I use:

Private Sub CheckBox1_Click()
Sheets("test").Activate
If CheckBox1.Value = True Then
Range("12:12, 18:18, 33:33").EntireRow.Hidden = False
Else
Range("12:12, 18:18, 33:33").EntireRow.Hidden = True
End If
End Sub





Thenks in advance!
 
Hello P. panter,

Open the VB editor, open your Form and make sure the property window is
dsiplayed (press F4). Select the check box on your UserForm and set the
VALUE property to TRUE. Repeat for each check box you want to come up
checked. Then save the changes.

Sincerely,
Leith Ross
 
If you want to keep the checkbox value each time you change it, you
could define names to store the values and hide them.

Names.Add Name:="Storevalue1", RefersTo:=value

Next time you open the form, read values from the name with:

checkbox1.value = [Storevalue1]

Regards.
 
Back
Top