Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to link a check box from form to a cell?
Hello everyone,
I have a check box placed by cell B5. I would like to give value 1 to cell B10 every time this box is check and 0 when unchecked. But I have problem linking this to a cell. I know that I can link to a cell using check box from control tool box. But I don't now how to write code using VB. Thanks in advance fro any help! Regards, Kim-Anh --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to link a check box from form to a cell?
In the module for the worksheet containing the CheckBox:
Private Sub CheckBox1_Click() Select Case CheckBox1.Value Case True: Range("B10").Value = 1 Case Else: Range("B10").Value = 0 End Select End Sub -- Olly "Kim-Anh Tran " wrote in message ... Hello everyone, I have a check box placed by cell B5. I would like to give value 1 to cell B10 every time this box is check and 0 when unchecked. But I have problem linking this to a cell. I know that I can link to a cell using check box from control tool box. But I don't now how to write code using VB. Thanks in advance fro any help! Regards, Kim-Anh --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to link a check box from form to a cell?
In design mode (depress Blue triangle) right click your checkbox View Cod
Add this Code Private Sub CheckBox1_Click() '<<<This is provide If Me.CheckBox1 = True Then Range("B10") = If Me.CheckBox1 = False Then Range("B10") = End Sub '<<<This is provide (depress Blue triangle ----- Kim-Anh Tran wrote: ---- Hello everyone I have a check box placed by cell B5. I would like to give value 1 t cell B10 every time this box is check and 0 when unchecked. But I hav problem linking this to a cell. I know that I can link to a cell usin check box from control tool box. But I don't now how to write cod using VB Thanks in advance fro any help Regards Kim-An -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and move check box (check boxes) with new cell link? | Excel Worksheet Functions | |||
Forms Check Box cell link | Excel Discussion (Misc queries) | |||
Paste Word Check Box Form Field Link into Excel | Excel Discussion (Misc queries) | |||
How to link check box to a cell? | Excel Programming | |||
link a cell into a vba form | Excel Programming |