I created a Userform with several checkboxes and comboboxes. Once all the
information is filled out, i hit the run button. I'm getting an error
because it's not reading if the checkbox is marked or not, it's always read
as unmarked. What is the correct way of coding this?

Re: Checkbox by dan

dan
Thu May 08 16:49:03 CDT 2008

To get started try:

http://support.microsoft.com/kb/213749/

OR

http://www.contextures.com/xlUserForm01.html

RE: Checkbox by JLGWhiz

JLGWhiz
Thu May 08 17:17:00 CDT 2008

Checkbox has a boolean value and VBA gives you three choices for Yes, On or
True and three choices for No, Off or False. So if you want to check if it
is checked then:

If Me.CheckBox1 = True Then
MsgBox "Checked"
Else
MsgBox "Not Checked"
End If

"Carol" wrote:

> I created a Userform with several checkboxes and comboboxes. Once all the
> information is filled out, i hit the run button. I'm getting an error
> because it's not reading if the checkbox is marked or not, it's always read
> as unmarked. What is the correct way of coding this?

RE: Checkbox by Carol

Carol
Fri May 09 16:22:03 CDT 2008

It's the simplest things that get to you. I figured out my mistake. Thank
you for your help!

"JLGWhiz" wrote:

> Checkbox has a boolean value and VBA gives you three choices for Yes, On or
> True and three choices for No, Off or False. So if you want to check if it
> is checked then:
>
> If Me.CheckBox1 = True Then
> MsgBox "Checked"
> Else
> MsgBox "Not Checked"
> End If
>
> "Carol" wrote:
>
> > I created a Userform with several checkboxes and comboboxes. Once all the
> > information is filled out, i hit the run button. I'm getting an error
> > because it's not reading if the checkbox is marked or not, it's always read
> > as unmarked. What is the correct way of coding this?