ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Checkbox (https://www.excelbanter.com/excel-programming/410666-checkbox.html)

Carol

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

dan dungan

Checkbox
 
To get started try:

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

OR

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

JLGWhiz

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


Carol

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



All times are GMT +1. The time now is 03:06 AM.

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