Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Frank
-Minitman On Tue, 26 Oct 2004 23:58:01 +0200, "Frank Kabel" wrote: cbx1.value |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you assess the state of a form-checkbox in a logic statemen | Excel Worksheet Functions | |||
replace state names with state code abbreviations | Excel Worksheet Functions | |||
How can I show state-by-state data (as silos) on a map of NA | Charts and Charting in Excel | |||
Converting State Names to State Abbreviations | Excel Discussion (Misc queries) | |||
testing the state of a checkbox in vba code | Excel Programming |