View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Userform with Checkboxes

You could do that, but why not just use a couple of option buttons--then when
you choose one, the other is unchosen.

if me.checkbox1.value = true _
and me.checkbox2.value = true then
msgbox "not both!
exit sub '???
end if

might be one way to validate in your "ok" button.


Greg B wrote:

Hi all,

I have a userform where I use checkboxes for the person to select either
one or the other.

I need help with a macro to check if either of checkbox1 or checkbox2
has been selected, but to also check that they both haven't been
selected at the same time.

How can I do this?

Thanks
Greg


--

Dave Peterson