Creating a Check Box that produce true or false statement

G

Guest

Hi,

I've seen in someone's worksheet where they have a 2 check box, one that
says "No" and one that says "Yes", when you place your cursor to either one
of these box and click it a check mark appears in the box. If the box is
checked, it produce the word "True" in a different cell, if the box is not
checked, the same cell will have the word "False". I would like to know how
this is created.

Your help is much appreciated!!!! Thanks!!!!
 
G

Guest

Here is a few lines of code that worked for me. Just modify the beginning of
it to where you want it to be copied

ws.Cells(iRow, 3).Value = IIf(Me.CkBox1.Value, "Yes", "No")
ws.Cells(iRow, 4).Value = IIf(Me.CkBox2.Value, "Yes", "No")
ws.Cells(iRow, 5).Value = IIf(Me.CkBox3.Value, "Yes", "No")
 
G

Guest

2 possible solutions...

1 - From the Forms toolbar drag a check box control onto your sheet. Right
click the control and select Format Control. On the control Tab Place a cell
address in the Linked Cell box. Close the Format Control dialog. Now when you
click the check box you will get true or false in the Linked Cell.

2 - From the Control Toolbox drag a check box to your worksheet. Right click
the control and select properties. In the property Linked Cell add in a Cell
address. Close the properties dialog. Inthe control toolbox you need to exit
design mode by clicking the Ruler and Pencil icon. Once again you have a
check box that Adds tryue and false to the linked cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top