Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default 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
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
UserForm OptionButtons Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 4th 07 07:52 PM
more than two optionbuttons in a group Stefi Excel Programming 4 November 3rd 06 10:41 AM
Disabling a 'Group' of OptionButtons JimP Excel Programming 2 January 26th 04 02:48 AM
OptionButtons Paul Excel Programming 4 December 4th 03 04:12 PM
optionbuttons Phil Perry Excel Programming 1 July 10th 03 09:13 PM


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