Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
group 3 optionbuttons and call them
I got six optionbuttons 12,13,14,15,16,17 in a frame. I need a code to check
if the user selected one of 12,13,14 and one of 15,16,17. in the properties field i named 12,13,14 groupa and 15,16,17 groupb. so i need a code similair to if (one of groupa)=true/enable then if (one of groupb)=true/enable then run code else msgbox "you need to specify department and daypart" end if thanx guys -- Helpful advice on posting to newsgroups here... http://www.cpearson.com/excel/newposte.htm |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
group 3 optionbuttons and call them
I would use a variable to accomplish this
dim groupa as variant groupa=optionbutton12.value + optionbutton13.value + optionbutton14.value dim groupb as variant groupb=optionbutton12.value + optionbutton13.value + optionbutton14.value if groupa =-1 then ..... else ...... end if "pswanie" wrote: I got six optionbuttons 12,13,14,15,16,17 in a frame. I need a code to check if the user selected one of 12,13,14 and one of 15,16,17. in the properties field i named 12,13,14 groupa and 15,16,17 groupb. so i need a code similair to if (one of groupa)=true/enable then if (one of groupb)=true/enable then run code else msgbox "you need to specify department and daypart" end if thanx guys -- Helpful advice on posting to newsgroups here... http://www.cpearson.com/excel/newposte.htm |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
group 3 optionbuttons and call them
Without using the frame:
if opt12.value = true _ or opt13.value = true _ or opt14.value = true then if opt15.value = true _ or opt16.value = true _ or opt17.value = true then call RunTheCode else msgbox "you chose the first group--but not the second" end if else msgbox "you have to choose the first group!" end if pswanie wrote: I got six optionbuttons 12,13,14,15,16,17 in a frame. I need a code to check if the user selected one of 12,13,14 and one of 15,16,17. in the properties field i named 12,13,14 groupa and 15,16,17 groupb. so i need a code similair to if (one of groupa)=true/enable then if (one of groupb)=true/enable then run code else msgbox "you need to specify department and daypart" end if thanx guys -- Helpful advice on posting to newsgroups here... http://www.cpearson.com/excel/newposte.htm -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
group 3 optionbuttons and call them
thanx.. will give that a try.. i did not use that before... how and for what
all can i use it?? seems like usefull feature -- Helpful advice on posting to newsgroups here... http://www.cpearson.com/excel/newposte.htm "pswanie" wrote: I got six optionbuttons 12,13,14,15,16,17 in a frame. I need a code to check if the user selected one of 12,13,14 and one of 15,16,17. in the properties field i named 12,13,14 groupa and 15,16,17 groupb. so i need a code similair to if (one of groupa)=true/enable then if (one of groupb)=true/enable then run code else msgbox "you need to specify department and daypart" end if thanx guys -- Helpful advice on posting to newsgroups here... http://www.cpearson.com/excel/newposte.htm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UserForm OptionButtons | Excel Discussion (Misc queries) | |||
more than two optionbuttons in a group | Excel Programming | |||
Disabling a 'Group' of OptionButtons | Excel Programming | |||
OptionButtons | Excel Programming | |||
optionbuttons | Excel Programming |