Check box has a faint tick when Userform loads.

sts023

Board Regular
Joined
Sep 1, 2008
Messages
111
Hello,
I'm developing a routine in Excel 2010 VBA.
In the initialisation of my Userform, when pre-setting values for the User, I've noticed that when the Userform is first shown, a checkbox in a frame on the Userform has a faint tick. If I repeatedly click the checkbox it goes 'full tick', then blank, then full tick again and so on.
Eventually after UAT I will decide if I want the checkbox should be checked or unchecked when the form is first displayed, but at the moment I'm trying to achieve some sort of 'clean' first look.
Can any kind soul suggest what the cause is, or what the initialisation code should be to achieve either a blank or 'full tick' checkbox when the Userform is first displayed, instead of the 'faint tick'?
 
Set its Value to True or False in the properties window.
 
Upvote 0
It's already set to "False" in both the properties window and the VBA code invoked when the Userform is displayed.
 
Upvote 0
No, it shouldn't be. If it's False, it should be blank. The faint tick means the value is null.
 
Upvote 0
Thanks, but that just poses another question - AFAIK I can only set the value to True or False, so how does it get to be null?
 
Upvote 0
If the Value property is empty, that's null. You can also assign it null in code, or if it's linked to a cell and that cell is empty, that would also do it.
 
Upvote 0
Thanks to your kind help, it's fixed.
In the code which activates the form, the checkbox's value was originally set to "xlOff". Changing that to "False" had the required result.
Once again, my thanks!
 
Upvote 0
Solution

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