I got 3 different form buttons on my spreadsheet. I want to disable 2 of them while one is pressed. Is that possible?
In C# the button can be true or false, but I can’t find any examples of this in VBA Excel 2010?
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot disable Form Buttons. If you want to use that functionality then use the ActiveX button.
However there is an alternative. Create 2 Public Boolean Variables and then in the click event of Button 1 Set the variables to True or False. Depending on the Boolean variables, the other 2 buttons will run their code or not. For example