ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do you disable a button? (https://www.excelbanter.com/excel-programming/293395-how-do-you-disable-button.html)

jest[_4_]

how do you disable a button?
 
how do you disable a button in excel?
i know how to disable buttons in userforms, but trying to use similar
coding like this:

ActiveSheet.Shapes("Button 1").Enabled = True

does not seem to work. can a button made from the Forms toolbar be
disabled?


---
Message posted from http://www.ExcelForum.com/


Bob Phillips[_6_]

how do you disable a button?
 
Hi Jest,

Get it from the Buttons collection

ActiveSheet.Buttons("Button 1").enabled = true


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jest " wrote in message
...
how do you disable a button in excel?
i know how to disable buttons in userforms, but trying to use similar
coding like this:

ActiveSheet.Shapes("Button 1").Enabled = True

does not seem to work. can a button made from the Forms toolbar be
disabled?


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 05:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com