Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Check Box Format!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Check Box Format!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Check Box Format!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Check Box Format!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Check Box Format!

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Check Box Format!

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
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
how to format a worksheet to tab through a series of check boxes? charvel Excel Worksheet Functions 0 April 21st 08 03:53 PM
Check if Conditional Format is True or False / Check cell Color Kevin McCartney Excel Worksheet Functions 5 June 29th 07 11:12 AM
Format dollar amounts for check printing Bob Phillips Excel Discussion (Misc queries) 0 November 20th 05 12:13 PM
Format dollar amounts for check printing Norman Jones Excel Discussion (Misc queries) 0 November 20th 05 07:23 AM
Excel VBA - Check/Format String magix Excel Discussion (Misc queries) 1 November 6th 05 11:02 AM


All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"