Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a check box. I would like to have this happens:
1. When the box is checked, it will appear "Y" in cell B4. 2. When it is unchecked, it will appear "N" in cell B4. How do I make this happens? Thanks in advance for your help! Kim-An -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Add this code (assumes name of checkbox is CheckBox1):
Private Sub CheckBox1_Click() If CheckBox1.Value Then Range("B4").Value = "Y" Else Range("B4").Value = "N" End If End Sub "Kim-Anh Tran " wrote in message ... I have a check box. I would like to have this happens: 1. When the box is checked, it will appear "Y" in cell B4. 2. When it is unchecked, it will appear "N" in cell B4. How do I make this happens? Thanks in advance for your help! Kim-Anh --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I forgot that cell "B4" is in another sheet!
How do I indicate the location of the cell B4? Thanks again! Kim-An -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub CheckBox1_Click()
With Worksheets("Sheet5") If CheckBox1.Value Then .Range("B4").Value = "Y" Else .Range("B4").Value = "N" End If End With End Sub -- Regards, Tom Ogilvy "Kim-Anh Tran " wrote in message ... I forgot that cell "B4" is in another sheet! How do I indicate the location of the cell B4? Thanks again! Kim-Anh --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check box40 is in sheet 1 and Cell "B4" is in sheet 2.
I appreciate anyone help to fix this problem! I have the error message "Can't execute code in break mode" Private Sub CheckBox40_Click() With Worksheets("sheet 2") If CheckBox40.Value Then Range("B4").Value = "Y" Else Range("B4").Value = "N" End If End With End Su -- Message posted from http://www.ExcelForum.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The message means code execution has been stopped (it is taking a "break".).
Either an error has paused execution for debug mode or you have paused execution, yet the checkbox is trying to execute its code. Reset the code. On the Run menu, click Reset <yourprojectname and try again. "Kim-Anh Tran " wrote in message ... Check box40 is in sheet 1 and Cell "B4" is in sheet 2. I appreciate anyone help to fix this problem! I have the error message: "Can't execute code in break mode" Private Sub CheckBox40_Click() With Worksheets("sheet 2") If CheckBox40.Value Then Range("B4").Value = "Y" Else Range("B4").Value = "N" End If End With End Sub --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to format a worksheet to tab through a series of check boxes? | Excel Worksheet Functions | |||
Check if Conditional Format is True or False / Check cell Color | Excel Worksheet Functions | |||
Format dollar amounts for check printing | Excel Discussion (Misc queries) | |||
Format dollar amounts for check printing | Excel Discussion (Misc queries) | |||
Excel VBA - Check/Format String | Excel Discussion (Misc queries) |