ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   enable or disable a workseet control (https://www.excelbanter.com/excel-programming/381083-enable-disable-workseet-control.html)

[email protected]

enable or disable a workseet control
 
I have added a "checkbox" control to a worksheet and use the
control to set a condition use in a separate procedure. I need to
disable the control depending on another whether or not a cell is empty
..

How do I set the Enable property programmatically?


[email protected]

enable or disable a workseet control
 
Thanks John, I was able work that into my project easily!

BTW, what is the significance of (ByVal Target As Range)? thats new to
me.

John Bundy remove wrote:
Example, if A1 is blank then checkbox is disabled otherwise it is enabled

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Cells(1, 1) = "" Then CheckBox1.Enabled = False Else CheckBox1.Enabled =
True

End Sub
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


" wrote:

I have added a "checkbox" control to a worksheet and use the
control to set a condition use in a separate procedure. I need to
disable the control depending on another whether or not a cell is empty
..

How do I set the Enable property programmatically?





All times are GMT +1. The time now is 11:30 PM.

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