check box operation linked

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

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

Check Box Operation Linked to Cell

resolvedResolved · Low Priority · Version 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

 

Training courses

 

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Shortcut for accessing recently opened files

To get into recently opened Excel files without using your mouse, hold down Alt + F to open the File menu.

Recently opened files are listed down the bottom of the File menu - type in the number next to the file you wish to open and it should appear on your screen.

View all Excel hints and tips


Server loaded in 0.08 secs.