Checkbox

C

Carol

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?
 
J

JLGWhiz

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
 
C

Carol

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

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