Thread: Command Button
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default Command Button

wow, this is harder then you'd think. because when you go to set the
other toggle buttons to false, it triggers the click event
again.......... i'm going round & round with boolean values & trying
to figure out the logic. i'll betcha there's something simple i'm
missing (application.enableevents=false doesn't work with userforms)
but i haven't found it yet.
susan



On Jul 23, 9:58*am, Susan wrote:
ha ha the thread's been hijacked! *no i don't think it's an
issue.............

anyway, i thought that if a group of toggle buttons is on a userform &
you put them all in a frame, then they might behave as option buttons
& only one can be selected...... but no, you can select them all.

so whether they're in a userform or if they're on a spreadsheet & you
want the behavior you described, you would have to CODE it that way,
by using grouping or tags - each time one was selected, you'd loop
through all the others & make sure they are all "false" or "true",
whichever you want.

if typeof ocontrol is msforms.togglebutton and
ocontrol.tag = "Group" then
ocontrol.value = false
end if

something like that.
hope it helps!
susan

On Jul 23, 9:38*am, Cerberus wrote:



Hey, quick question about toggle buttons if you don't mind. *Is there a way
to put a condition to a group of toggle buttons that says only one can be
selected at a time. *So let's say if we have 10 toggle buttons in a group and
slection A was pressed and then you decide selection C is better for you,
selection A will "pop" back up. *


Sorry to jump in and ask another question on someone elses question. *I
don't know if that goes against some kind of message board etiquette.


"Susan" wrote:
no, that would be a toggle button.
:)
susan


On Jul 23, 8:53 am, randy wrote:
Is it possible to make a commandbutton stay sunken when clicked? *
Thanks- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -