View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Olly[_6_] Olly[_6_] is offline
external usenet poster
 
Posts: 5
Default 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/