Verify that a button has been selected
Solved
Villette54
Posted messages
300
Registration date
Status
Member
Last intervention
-
Villette54 Posted messages 300 Registration date Status Member Last intervention -
Villette54 Posted messages 300 Registration date Status Member Last intervention -
Hello,
I need a little help. Actually, I have on my USF 2 an “optionbutton,” namely optionbutton1 and optionbutton2.
I’d like to add to my macro (which sends an email when you click validate) a step to verify that one of these two buttons has been checked. If one of them is checked, okay, we proceed. Otherwise a MsgBox asks to make a choice.
I’ve tried several approaches but can’t get it to work properly. I was thinking of something like:
If CommandButton2 = False And CommandButton1 = False Then MsgBox ("Veuillez choisir s'il s'agit d'un bug ou d'une amélioration")
Else GoTo Fin
End If
But that doesn’t work... For info I’m new to VBA, sorry if the error is obvious.
Thanks in advance.
I need a little help. Actually, I have on my USF 2 an “optionbutton,” namely optionbutton1 and optionbutton2.
I’d like to add to my macro (which sends an email when you click validate) a step to verify that one of these two buttons has been checked. If one of them is checked, okay, we proceed. Otherwise a MsgBox asks to make a choice.
I’ve tried several approaches but can’t get it to work properly. I was thinking of something like:
If CommandButton2 = False And CommandButton1 = False Then MsgBox ("Veuillez choisir s'il s'agit d'un bug ou d'une amélioration")
Else GoTo Fin
End If
But that doesn’t work... For info I’m new to VBA, sorry if the error is obvious.
Thanks in advance.
7 answers
-
In short, you ask pointless questions for which you already have the answers.
Indeed I’ve been asking questions about VBA for a while now, but that doesn’t change the fact that it’s a tool I use very occasionally. So obviously I’m a beginner, and yes I need help, but not yours.
So go waste your time elsewhere than on my topics. Thanks -
I’m not angry, but I’m tired of your repetitive messages on ALL of my topics.
I know very well that you helped me with my initial requests, and I thank you for that. But since then you keep coming onto my topics, without contributing anything. So let’s just say that I don’t need your help anymore.
With resentment, hoping I won’t have to deal with you again.
Have a good day. -
Hello
You have "optionbutton" and your code references "commandbutton"
--
Michel -
Thank you for this comment very helpful as always.
-
Hello,
how long have you been starting with VBA?! o_O
See you later -
I waited for Michel_m to respond so that you would have something constructive.
it amuses me (maybe only me) to invoke the beginner's argument when in March you were already posting questions about VBA.
PS: I already suspect you’ll respond that you don’t do VBA all day long. -
You seem really tense... And for the record, yes, you have already needed my help. No hard feelings