#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default Checkbox

To get started try:

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

OR

http://www.contextures.com/xlUserForm01.html
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
link a checkbox in a sheet to a checkbox on a userform? Arjan Excel Programming 0 November 10th 06 01:37 PM
How do I link one checkbox to update another checkbox? Mike Excel Programming 3 April 28th 06 02:22 AM
checkbox on form reset from checkbox on sheet raw[_12_] Excel Programming 1 December 3rd 05 05:08 AM
Checkbox Susan Hayes Excel Programming 1 March 31st 05 11:42 PM


All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"