• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3486
  • Last Modified:

Disable And Enable Button Using Excel Macro

Hello...

I have one question, how to enable and disable button using excel macro. I have created two buttons on excel worksheet. For example, button A and button B. When i click at button A, macro will enable button B. Before this button B is disable. ok...

Senico
0
senico
Asked:
senico
1 Solution
 
ColosseoCommented:
Hi

On the Visual Basic toolbar click the Design Mode button and then the Control Toolbox
Select button A and then on the Control Toolbox click View Code

Then in the code for button A type this (you might have to change CommandButton2 to the name of your second button if you have changed it.

CommandButton2.Enabled = Not CommandButton2.Enabled

Now when you Click button A, button B will be enabled or disabled

Cheers

Scott
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now