Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

check box operation linked

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Check Box Operation Linked to Cell

Check Box Operation Linked to Cell

ResolvedVersion 2003

David has attended:
Excel Advanced course
Excel Advanced course

Check Box Operation Linked to Cell

Hi,

How can I get a random cell to change from True to False on the operation of a check-box? I.e. if a check-box is ticked the cell will show "True"; if check-box is un-ticked the cell will show "False."

Many Thanks,
David

RE: Check Box Operation Linked to Cell

Hi David,

Thank you for your question.

If you go to View - Toolbars - Control Toolbox and then select the checkbox tool and draw a text box on your spreadsheet.

Once drawn, increase the length of the control to see the label and edit the label if necessary.

Right click over the checkbox and choose View Code. Make a note of the name of the checkbox by right clicking and Properties.

Copy and paste the following code between Private Sub CheckBox1_Click and End Sub:

If CheckBox1.Value = True Then

Range("a3") = "True"

Else

Range("a3") = "False"

End If

Close the Visual Basic window down and turn off design view to use the checkbox. On the control toolbox Design Mode is the first option.

I hope this answers your question.

Regards

Simon

Excel tip:

Turn off AutoComplete in Excel

You may have noticed when typing into your spreadsheets that if you start to enter labels that begin with the same letters as a label that has been previously entered in the same spreadsheet, Excel will try and automatically complete the text for you. This feature is called AutoComplete.

If you find this feature more annoying than useful, you can turn it off by:

1. Going to Tools - Options.

2. Select the Edit tab.

3. Remove the tick from next to the "Enable AutoComplete for cell values" option.

4. Click OK.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.