Disable/Enable Button

alexchen

New Member
Joined
Apr 6, 2014
Messages
3
Hi All

I have create 2 Form Buttons in my worksheet, one to calculate the result and the other to Reset/clear the result. What I want is once the Calculate button clicked, it will be disable and grey out, and will be enable again once the result has been clear by clicking the Reset button. Is there a way Macro can do?

Thanks in advance.

Alex:cool:
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Anyway the user can not do anything if the form is calculation or working behind and if u want to do some gimmicks while the code is running just design another form with attractive colors or place a light grey dull color pic in another form, just put "another form name"(wihout quotes) .show before the code and before the end sub put unload me
 
Upvote 0
You can try
Code:
ActiveSheet.Buttons("btnReset").Enabled = False 'Use button name
' or
ActiveSheet.Buttons(1).Enabled = False 'Use index
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top