ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CheckBox check marks save (https://www.excelbanter.com/excel-programming/352666-checkbox-check-marks-save.html)

p. panter

CheckBox check marks save
 
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!



Leith Ross[_538_]

CheckBox check marks save
 

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


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=509423


dbarelli

CheckBox check marks save
 

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.


--
dbarelli
------------------------------------------------------------------------
dbarelli's Profile: http://www.excelforum.com/member.php...o&userid=31275
View this thread: http://www.excelforum.com/showthread...hreadid=509423



All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com