Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checkbox
Hello
I would like to perform the following 2 tasks when someone clicks on the checkbox featu First is enter the word "Market" in cell G9 and Secondly to take whatever number appears in cell G16 and have it appear in cell B9, if the check box is not selected then to leave blank both cells G9 and B9. I tried the following but it does not work: Private Sub Checkbox1_Clicks() If CheckBox1.Value = True Then Range("B9").Value = Range("G16").Value and Range("G9") = "Market" Else: Range("B9").Value = "" Range("G9") = "" End Sub Your help would be appreciated Jen T. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checkbox
Susan/Jen T.
This is working for me, maybe it does what you want... '---------------------------------------------------------- Private Sub CheckBox1_Click() If CheckBox1.Value = True Then Range("B9").Value = Range("G16").Value Range("G9") = "Market" Else Range("B9").Value = "" Range("G9") = "" End If End Sub '---------------------------------------------------------- Regards, Jim Cone San Francisco, USA "Susan Hayes" wrote in message ... Hello I would like to perform the following 2 tasks when someone clicks on the checkbox featu First is enter the word "Market" in cell G9 and Secondly to take whatever number appears in cell G16 and have it appear in cell B9, if the check box is not selected then to leave blank both cells G9 and B9. I tried the following but it does not work: Private Sub Checkbox1_Clicks() If CheckBox1.Value = True Then Range("B9").Value = _ Range("G16").Value and Range("G9") = "Market" Else: Range("B9").Value = "" Range("G9") = "" End Sub Your help would be appreciated Jen T. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to have Checkbox A uncheck with checked Checkbox B | Excel Discussion (Misc queries) | |||
Checkbox | New Users to Excel | |||
checkbox? | Excel Worksheet Functions | |||
CheckBox in VBA | Excel Programming | |||
Checkbox | Excel Programming |