View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] robert.hatcher@l-3com.com is offline
external usenet poster
 
Posts: 55
Default 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?