Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How To Get The State Of A CheckBox

Greetings,

Anyone know what the syntax would be to determine the state of a
CheckBox (CBX1) that I have on a UserForm?

TIA

-Minitman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default How To Get The State Of A CheckBox

cbx1.value

--
Regards
Frank Kabel
Frankfurt, Germany

"Minitman" schrieb im Newsbeitrag
...
Greetings,

Anyone know what the syntax would be to determine the state of a
CheckBox (CBX1) that I have on a UserForm?

TIA

-Minitman


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How To Get The State Of A CheckBox

Thanks Frank

-Minitman

On Tue, 26 Oct 2004 23:58:01 +0200, "Frank Kabel"
wrote:

cbx1.value


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How To Get The State Of A CheckBox

Hey Frank,

I am attempting to put a "Y" on my spreadsheet if cbx1.value is true
and nothing if it is false. I can't seem to get it from the userform
to the spreadsheet.

Any ideas?

-Minitman



On Tue, 26 Oct 2004 23:58:01 +0200, "Frank Kabel"
wrote:

cbx1.value


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How To Get The State Of A CheckBox

Private Sub cbx1_click()
if cbx1.Value then
worksheets("Sheet1").Range("A1").Value = "Y"
else
worksheets("Sheet1").Range("A1").ClearContents
end if
end Sub

--
Regards,
Tom Ogilvy

"Minitman" wrote in message
...
Hey Frank,

I am attempting to put a "Y" on my spreadsheet if cbx1.value is true
and nothing if it is false. I can't seem to get it from the userform
to the spreadsheet.

Any ideas?

-Minitman



On Tue, 26 Oct 2004 23:58:01 +0200, "Frank Kabel"
wrote:

cbx1.value






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default How To Get The State Of A CheckBox

Hey Tom,

It's a bit more complicated then that i'm afraid.

The paste down is done within a With statement. using the cbx1.value
I can get "TRUE" in the correct column. All of my code on the sheet
is looking for a "Y" not a "TRUE". I was looking for a way to convert
the "TRUE" to a "Y" before it pasted down with the rest of the row.

Oh, in case I forgot to mention it, thanks for the assist on finding
the sheet with the mmm-yy formatted name tabs. I finally got that
section working (this is in the same UserForm).

I am looking for a simple solution, if there is no "simple" solution,
then I can go into the sheet formulas and change them to look for
"TRUE" instead of "Y"

TIA

-Minitman


On Tue, 26 Oct 2004 19:34:55 -0400, "Tom Ogilvy"
wrote:

Private Sub cbx1_click()
if cbx1.Value then
worksheets("Sheet1").Range("A1").Value = "Y"
else
worksheets("Sheet1").Range("A1").ClearContents
end if
end Sub


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How To Get The State Of A CheckBox

If, by paste down, you mean you have set the controlsource property to a
cell, then the value in that cell will be True or False. It will only be
blank if no selection has been made. You can not make the cell contain "Y"
or anything else by using the controlsource property.

Otherwise, you will have to show what code you are using (that demonstrates
the terminology paste down) that makes it more complicated than that.

--
Regards,
Tom Ogilvy


"Minitman" wrote in message
...
Hey Tom,

It's a bit more complicated then that i'm afraid.

The paste down is done within a With statement. using the cbx1.value
I can get "TRUE" in the correct column. All of my code on the sheet
is looking for a "Y" not a "TRUE". I was looking for a way to convert
the "TRUE" to a "Y" before it pasted down with the rest of the row.

Oh, in case I forgot to mention it, thanks for the assist on finding
the sheet with the mmm-yy formatted name tabs. I finally got that
section working (this is in the same UserForm).

I am looking for a simple solution, if there is no "simple" solution,
then I can go into the sheet formulas and change them to look for
"TRUE" instead of "Y"

TIA

-Minitman


On Tue, 26 Oct 2004 19:34:55 -0400, "Tom Ogilvy"
wrote:

Private Sub cbx1_click()
if cbx1.Value then
worksheets("Sheet1").Range("A1").Value = "Y"
else
worksheets("Sheet1").Range("A1").ClearContents
end if
end Sub




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default How To Get The State Of A CheckBox

Test the Value property of the CheckBox object. There are examples in Help for
setting the value. I assume you can figure out from that how to read it <g.


On Tue, 26 Oct 2004 16:55:38 -0500, Minitman wrote:

Greetings,

Anyone know what the syntax would be to determine the state of a
CheckBox (CBX1) that I have on a UserForm?

TIA

-Minitman


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 do you assess the state of a form-checkbox in a logic statemen jvatlanta Excel Worksheet Functions 1 August 4th 09 05:13 PM
replace state names with state code abbreviations se7098 Excel Worksheet Functions 3 July 25th 09 06:41 PM
How can I show state-by-state data (as silos) on a map of NA Rob Charts and Charting in Excel 0 November 5th 07 03:41 PM
Converting State Names to State Abbreviations aznate Excel Discussion (Misc queries) 1 October 20th 06 06:52 AM
testing the state of a checkbox in vba code Paul James[_3_] Excel Programming 10 December 5th 03 07:55 PM


All times are GMT +1. The time now is 03:30 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"