CheckBox check marks save

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!
 
L

Leith Ross

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
 
D

dbarelli

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top