Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
frendabrenda1
 
Posts: n/a
Default 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   Report Post  
mas_detokyo
 
Posts: n/a
Default


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
cell formatting problems jazzsax505 New Users to Excel 2 May 29th 05 10:30 PM
Import Data into same cell ib_redbeard Excel Discussion (Misc queries) 3 March 1st 05 12:08 PM
Repeat Cell Data Pinky Excel Worksheet Functions 1 January 18th 05 05:38 PM
Retrieve last cell with data JimDandy Excel Worksheet Functions 2 November 20th 04 06:50 PM


All times are GMT +1. The time now is 06:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"