Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default Formula for using check boxes

If this has been asked before, sorry for a repeat. In a form I' creating
that will be later imported to Access, some sections I have uses check boxes.
I'm very new to excel, especially using formulas.

For check boxes, like a Yes and No, if a person checks Yes, I would like the
cell to prevent the No box from being check and vice-versa. Also for check
boxes with multiple choices, if they check 3 items, I would like all 3 text's
to appear in the data field that will later be exported to Access. Is there
a way to do this? Thank you
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 39
Default Formula for using check boxes

Hell-fi

It sounds like what you want in your Yes/No example is a optionbutton. It's
a little annoying to be prevented changing your mind in the middle of using a
form, so using a checkbox and preventing a change is possible, but probably
not the best. You can have several optionbuttons on the form. In the
properties of the optionbutton, you can set a groupname.

So, for example: with two questions you can have four optionbuttons

Optionbutton1 with caption "Yes" and groupname "Question1"
Optionbutton2 with caption "No" and groupname "Question1"
Optionbutton3 with caption "Yes" and groupname "Question2"
Optionbutton4 with caption "No" and groupname "Question2"
.... If you click Yes for question1, you can also click yes for question2.
If you change your mind on question1, you can click No... then optionbutton2
value becomes "true" and optionbutton1's value automatically becomes "false"

Also, use the properties to set the default value if you so choose.

On your second question:
Checkbox1 = "Include this"
Checkbox2 = "text"
Checkbox3 = "pig"
Checkbox4 = "in my"
Checkbox5 = "car"
Checkbox6 = "worksheet"

When you want to add the results of the checkboxes to a cell on the worksheet:

Dim myoutput as string
If checkbox1 = true then myoutput = myoutput & checkbox1.caption & " "
If checkbox2 = true then myoutput = myoutput & checkbox2.caption & " "
If checkbox3 = true then myoutput = myoutput & checkbox3.caption & " "
If checkbox4 = true then myoutput = myoutput & checkbox4.caption & " "
If checkbox5 = true then myoutput = myoutput & checkbox5.caption & " "
If checkbox6 = true then myoutput = myoutput & checkbox6.caption & " "
myoutput = left(myoutput, len(myoutput)-1)
myoutput = myoutput & "."
Msgbox myoutput

If you check boxes 1, 3, 4, and 5 you should get a message: "Include this
pig in my car." If you check boxes 1, 2, 4, and 6 you should get a message:
"Include this text in my worksheet." If you checkboxes 2,3,6 you should get
a message "text pig worksheet." which is admittedly nonsensical, but, you
should get the idea.

Hope this helps. Unfortunately, I can't comment on how the form or data
will perform under Access's environment, nor can I comment on how to import
data or anything else with Access, although the environments are similar.

drhalter


"Hell-fire" wrote:

If this has been asked before, sorry for a repeat. In a form I' creating
that will be later imported to Access, some sections I have uses check boxes.
I'm very new to excel, especially using formulas.

For check boxes, like a Yes and No, if a person checks Yes, I would like the
cell to prevent the No box from being check and vice-versa. Also for check
boxes with multiple choices, if they check 3 items, I would like all 3 text's
to appear in the data field that will later be exported to Access. Is there
a way to do this? Thank you

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
Check All Boxes Supe Excel Discussion (Misc queries) 0 January 23rd 07 02:00 PM
How do I increase the size of check in check boxes Adams, Les Excel Discussion (Misc queries) 0 September 19th 06 02:35 PM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM
How do i create a value for check boxes or option boxes Tim wr Excel Discussion (Misc queries) 1 February 9th 06 10:29 PM
Creating Formula using check boxes Anthony Slater Excel Discussion (Misc queries) 3 January 4th 05 03:03 PM


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

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

About Us

"It's about Microsoft Excel"