Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default 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
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
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
Forms Check Box cell link pwkauf Excel Discussion (Misc queries) 4 January 14th 10 02:49 AM
Paste Word Check Box Form Field Link into Excel VAB Charlie Excel Discussion (Misc queries) 0 September 15th 06 04:52 PM
How to link check box to a cell? Kim-Anh Tran[_23_] Excel Programming 2 May 17th 04 10:23 PM
link a cell into a vba form newman Excel Programming 3 October 27th 03 04:42 AM


All times are GMT +1. The time now is 04:57 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"