Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think that I could get a checkbox to go out and do something after someone
checked it - But can I set the value of a checkbox based on the value in some cell? Example - I have a checkbox cleverly known as Checkbox 15; I would like that checkbox to set itself to being checked when my user places a value in the cell F26 doable? and how? Users could set this checkbox themselves but always forget....thanks ahead of time |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Wed, 27 Dec 2006 13:46:01 -0800, Marquel
wrote: I think that I could get a checkbox to go out and do something after someone checked it - But can I set the value of a checkbox based on the value in some cell? Example - I have a checkbox cleverly known as Checkbox 15; I would like that checkbox to set itself to being checked when my user places a value in the cell F26 doable? and how? Users could set this checkbox themselves but always forget....thanks ahead of time Assuming that you're using the checkbox from the Control Toolbox toolbar rather than the Forms toolbar, you can do it by using the worksheet change event as follows (right click on the sheet tab and select "View Code", then copy and paste this procedure into the module that appears): Private Sub Worksheet_Change(ByVal Target As Range) Dim vnt As Variant If Target.Address = "$F$26" Then vnt = "" 'Just in case something weird happens in reading the value On Error Resume Next vnt = CStr(Target.Value) On Error GoTo 0 If vnt = "" Then Me.CheckBox15.Value = False Else Me.CheckBox15.Value = True End If End If End Sub --------------------------------------------------------- Hank Scorpio scorpionet who hates spam is at iprimus.com.au (You know what to do.) * Please keep all replies in this Newsgroup. Thanks! * |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding a ComboBox with a Checkbox | Excel Worksheet Functions | |||
Click event for checkbox from Forms toolbar | Excel Discussion (Misc queries) | |||
Checkbox functionality | Excel Discussion (Misc queries) | |||
Two data sets, one average | Charts and Charting in Excel | |||
copy many CHECKBOX | Excel Discussion (Misc queries) |