ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Set Enable = False without selecting? (https://www.excelbanter.com/excel-programming/298350-set-enable-%3D-false-without-selecting.html)

William DeLeo

Set Enable = False without selecting?
 
Hello all,

Can someone tell me how I can rewrite the following commands so tha
the control does not need to be selected to be disabled?

Thanks!


Sheets("Sheet Name").Shapes("Drop Down 3").Select
With Selection
.Enabled = False
End Wit

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


kkknie[_97_]

Set Enable = False without selecting?
 
Sheets("Sheet Name").Shapes("Drop Down 3").Enabled



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


William DeLeo

Set Enable = False without selecting?
 
Thanks for the quick reply!

Q: That command will DIS-able the control or EN-able it?

I need to be able to do both ...

Thanks agai

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


Juan Pablo González

Set Enable = False without selecting?
 
Actually, neither, you have to set it yourself:

Sheets("Sheet Name").Shapes("Drop Down 3").Enabled = False

or

Sheets("Sheet Name").Shapes("Drop Down 3").Enabled = True

--
Regards

Juan Pablo González

"William DeLeo " wrote in
message ...
Thanks for the quick reply!

Q: That command will DIS-able the control or EN-able it?

I need to be able to do both ...

Thanks again


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





All times are GMT +1. The time now is 01:36 AM.

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