Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Disable a checkbox dependant upon cell data
I have a checkbox set up (NOT on a form) that I would like to disable when a
corresponding cell says "Not Applicable". If a macro must be used for this....where does the code go? Thank you for any info. |
#2
|
|||
|
|||
I think, you can do it by putting the code below to the sheet macro which your checkbox resides. Code: -------------------- Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo EXITSUB: Me.CheckBox1.Enabled = IIf(Range("$A$1").Value = "NA", False, True) EXITSUB: End Sub -------------------- Assumption: 1. CheckBox is named as "CheckBox1". 2. Corresponding cell is "$A$1". 3. Disable CheckBox when the cell "$A$1" get value "NA" You can change the code accordingly as you want. mas -- mas_detokyo ------------------------------------------------------------------------ mas_detokyo's Profile: http://www.excelforum.com/member.php...o&userid=26712 View this thread: http://www.excelforum.com/showthread...hreadid=401120 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Possible Lookup Table | Excel Worksheet Functions | |||
cell formatting problems | New Users to Excel | |||
Import Data into same cell | Excel Discussion (Misc queries) | |||
Repeat Cell Data | Excel Worksheet Functions | |||
Retrieve last cell with data | Excel Worksheet Functions |