Question:
Check boxes in Excel 2007?
BT24
2010-04-28 14:22:00 UTC
I want to add check boxes (which I have no idea to do) in column D, but I dont want the box boxes to appear unless data is intered into column A, that way I can keep the spread sheet clean because I will be adding data to this spread sheet daily. I have no idea how to even start this process. Any help would be great! Thanks!
Four answers:
garbo7441
2010-04-28 19:12:42 UTC
Here is how you can do what you ask. First, you have to create the check boxes.



Click the Microsoft Office Button Button image, and then click Excel Options.



In the Popular category, under Top options for working with Excel, select the Show Developer tab in the Ribbon check box, and then click OK.



On the Developer tab, in the Controls group, click Insert and then, under Form Controls, click the Check box image.



Click on cell D1, and drag in the worksheet to create the first check box.



You can size it by clicking a corner and dragging diagonally. Size it so the 'caption' field of the check box is pretty well contained inside the cell borders.



Right click the check box and select 'Edit Text'. Replace 'Check box 1' with the caption text you wish to use for this check box, or delete it completely to just show the check box.



Click off of the check box, then right click it and 'Copy'. Click cell D2 and 'Paste'.



Repeat this process for as many checkboxes you wish to add in column D. As you add check boxes, Excel will automatically name them sequentially as you paste them in.



After all check boxes have been created and added, copy the following event handling code to the clipboard:





Private Sub Worksheet_SelectionChange(ByVal Target As Range)

For i = 1 To ActiveSheet.Shapes.Count

If Range("A" & i).Value <> "" Then

ActiveSheet.Shapes("check box " & i).Visible = True

Else

ActiveSheet.Shapes("check box " & i).Visible = False

ActiveSheet.Shapes("check box " & i).ControlFormat.Value = 0

End If

Next

End Sub





Next, select the appropriate worksheet and right click the sheet tab.



Select 'View Code'



Paste the code into the sheet module editing area to the right.



Close the VBE and return to Excel.



Click on any cell. If column A contains no data, all check boxes will be hidden. If you enter text in a cell in column A linked to a check box, that check box will become visible.



NOTE: The critical aspect of the mechanics of this is that Check Box 1 will be controlled by cell A1. Check Box 2 will be controlled by A2, Check Box 3 by A3, etc. You must align them appropriately.



Also, if you create some check boxes, then delete them to start over, Excel will begin naming any new ones that you add where it left off naming the old ones.
2016-10-13 03:45:13 UTC
Insert Checkbox In Excel 2007
Thanh
2015-08-19 06:59:50 UTC
This Site Might Help You.



RE:

Check boxes in Excel 2007?

I want to add check boxes (which I have no idea to do) in column D, but I dont want the box boxes to appear unless data is intered into column A, that way I can keep the spread sheet clean because I will be adding data to this spread sheet daily. I have no idea how to even start this process. Any...
2016-03-15 02:06:08 UTC
You have to assign a macro to the checkbox. Right click, Assign macro. Within the macro insert something like Sub CheckBox1_Click() If ActiveSheet.CheckBoxes(Application.Calle... _ = 1 Then Sheets("Sheet1").Visible = True Else Sheets("Sheet1").Visible = False End If End Sub Yahoo truncated the answer. Write me for the untruncated code.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...