User Form ComboBoxes and CheckBoxes are blank

Grimm127

Board Regular
Joined
Aug 17, 2011
Messages
132
Hi All you Guru's!

I am having a little trouble with my use form. The form has 5 combo boxes and 12 check boxes. All my links work and everything seems fine with the exception of when I open the user form all the boxes are blank.

So If I select 5 check boxes and then close it and then reopen it those same are blank. What am I missing? I would like to keep the selections or the very least is have all he check boxes with the checks and the combo boxes to be set at the first selection. Can anyone help me out?

Sub Userform()
Dim form as new Userform1
form.Show
End Sb

Private Sub Close_Box
me.hide
End sub
 
Below is an example of a project. CkB11 is linked to a defined name "RngHv1". This name is not linked to a cell, but is set to true or false every time user click CB11. I can use it formula and when he opens the userform, te checkbox is ticked or not depending on this value.

Code:
Private Sub CkB11_Click()
Range("RngHv1") = CkB11.Value
End Sub
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
The combo Boxes are names Combobox1 thru ComboBox5
The checkboxes are named Checkbox1 thru Checkbox12 (Jan-Dec if you get the idea)
I didn't go the trouble of naming them since this is the only ones am going to use.
The Combo Boxes ranges are named ranges.
CB1 = SELECT_TYPE
CB2 = REGIONAL
CB3 = MANAGER
CB4 = T.MANAGER
CB5= BUSINESS_LINE

CheckBoxes
If Checkbox(#).Value = True then Thisworkbook.worksheets("SALES").Range("E3").Value = "X"
If Checkbox(#).Value = False then Thisworkook.worksheets("SALES").Range("E3").Clear

(Note the above reference cell is the starting point E=Jan, F=Feb,G = Mar, etc.
Hope this helps
 
Upvote 0
To save all these control values someplace on your sheet and then recall them every time you open your Userform would take a lot of coding as far as I know. And I'm not really sure what your trying to do.

How did all these controls get values assigned in the first place.

This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top