Free Microsoft Excel 2013 Quick Reference

change cell link for many check boxes at once

I use a lot of check boxes (from the Forms toolobar) in my application.
Often they are all in a column and I want all of the linked cells to be all
in a column as well. For example, Checkbox1 (CB1) is in c1, linked to r1;
CB2 is in c2 linked to r2, CB3 is in C3 linked to R3, etc.

Is there any way to set all the cell links at once using some form of
relative referencing? I have not been able to do this. I have to set each
individual cell link reference by hand.

I am using Office 2003.


Post your answer or comment

comments powered by Disqus
I need to create around 1,250 check boxes in Excel. Each one of these is linked, so that I can run formulas on the linked cells. The problem is that the cell link does not automatically change when I copy and paste the check box. Each check box is dependent on the original i.e. when I check one, they all change. Is there a simple way to fix this without individually entering each check box?

I recorded the following macro when changing the cell link of a check box. Can someone help with the code to peform this for check box numbers by 15460 through 16000, assigning cells A1 through A540?

Sub Macro5()
' Macro5 Macro
' Macro recorded 4/1/2008

ActiveSheet.Shapes("Check Box 15460").Select
With Selection
.Value = xlOff
.LinkedCell = "A1"
.Display3DShading = False
End With
End Sub



I am trying to devise a macro so that one a check box is activated its Value in A1 = C1, and when uncheck its empty.

eg: A1=IF(checkbox1= True,C1,"")

How can I write this so that I have a two ranges of cell each with its own check box so
CheckBox1(A1 = C1), CheckBox2 (A2 = C2) ..... CheckBox10 (A10=C10) and then onther range
CheckBox1 (E1 = G1), CheckBox2 (E2 = G2) ..... CheckBox1 (E10=G10)

All so they operate from the same Macro, but with there own check box?

Thanks, if a single macro is not possible perhaps someone could show simple way of setting it up for many checkboxes.

PS is there any limitation on check box, does excel slow down if you have too many or somthing like that?

I'm developing a spreadsheet that's going to have over 100 checkboxes that
each have a specific cell link. After I created one row, I attempted to copy
them all to the next row down but the cell link of the check box still
referenced the original cell in the prior row. Is there an easy way to get
the cell link to change to the new cell when copying or do I have to change
each of these individually (OUCH!)?

I want to add a check box cells a1 thru a400. Each check box should be linked to the cell next to it.

Is there a fast way to do this? I dont want to have to manually link each check box to its cell, or create each check box 1 at a time.

Anyone know a simple way to do this?

I want to put a check box (control tb) in every cell in col a1 to a100.

I want each check box to be linked to the adjacent cell (a1 linked to b1).

Is there a way to do this with out having to manually change the value in the linked cell option for each check box?

What is the quickest way to accomplish this? Is there a way to drag the check box to other cells & have the linked cell value progress? or is there a macro i can use?"

Would like to create multiple combo boxes by copying and pasting a cell
containing a combo box but would like for the cell link for each combo box to
be a relative cell reference so that the cell link is different for each
combo box. Have tried changing the cell link to a relative reference before
copying, but has no effect.

I am copying a spin button several times (over 100 spin buttons in this input
spreadsheet) and rather than having to go into the "format control" screen
100+ times, I was hoping that there was a way to quickly and easily change
the cell link for each of the copies spin buttons. I removed the anchors in
the "cell link" filed of the format control however, when I copy and paste
the sin button, this cell link character doesn't change. Is there an quicker
way to change the "cell link" for each copied spin button?


I am new to this forum and not sure if anyone has asked this before:

Is there such a way to insert many check boxes to a column of cells, with one check box in each cell?

Thank you in advance.

I'm trying to change the font in a check box created from the 'Forms
Toolbar', is it possible to change it and if it is how can i go about doing

Thank you in advance!!


I have a macro that I execute with a button in the Ribbon.

This macro gives the user the option to select between 2 analysis modes via an input window (Do a country specific analysis or not. If yes, what is the name of the country)

What I would like to do is move this option to a Ribbon check box. In other words I want the user to check or not check a check box in the Ribbon depending on what type of analysis the user wants to do.

Subsequently the user executes the macro by pressing the Ribbon button.

I imagine that the code that links the Ribbon check box with the macro looks something like the code below. If somebody could tell me exactly how it is done that would be great.

Sub CountryAnalysis()

if toggle button = pressed then
    AuthorCountry = InputBox("What Country?")
    'MsgBox "You entered: " & AuthorCountry
end if

End Sub

I cannot get my macro to hide rows based on the value of a cell linked to a check box. I got a macro to work when typing directly into a cell, but cannot get it to hide rows when a cell value is updated based on whether a check box is checked or not. So, if the check box is checked, the value in the linked cell becomes TRUE. Here's the code I used to hide a range of rows when typing the word TRUE directly in a cell:

Private Sub Worksheet_Change(ByVal Target As Range)
     If Intersect(Target, Range("A3")) Is Nothing Then Exit Sub
     Rows("6:7").Hidden = Application.CountIf(Range("A3"), "TRUE")
End Sub
Can this be modified to work with a cell value based on a formula? I'm a novice with VBA, so any help is appreciated.



Based on help I've seen on this forum and elsewhere, I'm trying to code something in VBA that should be fairly simple, but I can't get it work! Any help would be much appreciated.

I've got a range of Award Text Cells (B33:B42), each of which may or may not contain an entry (text) . If the Award Text Cell is populated, then I would like a Check Box to appear in the Next column (column C). If it isn't then I want to hide the check box.

I need the Check Box to be linked to its cell in the C column, so that I can use the value in other calculations.

When I try to compile this, I get an "Else without If" error at the line shown.

I've stared at this for ages, and can't see what I doing wrong - any help would be gratefully received.

Many thanks

    Dim OLEObj As OLEObject 
    Dim c As Range 
     'Exit sub if not changing Awards part of sheet or if selecting more than 1 cell
    If Intersect(Target, Range("B33:C42")) Is Nothing Then Exit Sub 
    If Target.Cells.Count > 1 Then Exit Sub 
    For Each c In Range("B33:B42") 
         ' Hide or show checkbox based on values in Award Text cells
        If c.Value = "" Then 
             'Award Text cell is empty. Hide Check Box if it already exists, but don't create one if it doesn't
            With c.Offset(0, 1) 
                 'Test Each Check Box
                For Each OLEObj In Me.OLEObjects 
                    If TypeOf OLEObj.Object Is MSForms.CheckBox Then 
                         'Only look at Check Boxes, no other OLE objects
                        If OLEObj.TopLeftCell.Address = .Address Then 
                             'Check Box already exists, so hide it
                            With OLEObj 
                                .Visible = False 
                            End With 
                        End If 
                    End If 
                Next OLEObj 
                 'If Check Box doesn't already exist, do nothing - will create when needed
                 ' This is the line when the error shows
                 'Award Text Cell isn't empty. Show Check Box if it already exists or create one if it doesn't
                 'Test Each Check Box
                For Each OLEObj In Me.OLEObjects 
                    If TypeOf OLEObj.Object Is MSForms.CheckBox Then 
                         'Only look at Check Boxes, no other OLE objects
                        If OLEObj.TopLeftCell.Address = .Address Then 
                             'Check Box already exists, so show it
                            With OLEObj 
                                .Visible = True 
                            End With 
                        End If 
                    End If 
                Next OLEObj 
                 'Check Box doesn't already exist, so create it
                Set OLEObj = .Parent.OLEObjects.Add(ClassType:="Forms.CheckBox.1", _ 
                Link:=True, DisplayAsIcon:=False, _ 
                Left:=.Left, Top:=.Top, _ 
                Width:=.Width, Height:=.Height) 
                With OLEObj 
                    .Object.Caption = "" 
                    .Object.Value = False 
                End With 
            End With 
        End If 
    Next c 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

I have created a document with text, check boxes and IF formulas dependant
on the TRUE or FALSE values for each of the check boxes. This was done over
time and it is fairly extensive at this point and I would like to duplicate
that document on the same sheet about 6 to 8 times below the original. When I
copy the document and paste it below the original (text, formulas and check
boxes), the references (cell link) for all of the check boxes are linked to
the original document (clicking a check box in the copied document add a
check mark to both the copied and original check boxes which I do not want).
I have used the "form" check boxes. Is there a way to copy and paste check
boxes and obtain a new cell reference?

Other recommendations?

Thank you.


I've set up a spreadsheet to extract external data from an SQL database
using the Import External Data function.

This spreadsheet contains about 50 queries, that can convenently be
refreshed all at once.

Problem is that I've saved the password on each of these queries as I was
setting them up, and now my password has changed.

Is there any easier way to change the password for all of these queries at
once? Right now, I have to uncheck the Save Password box on the Data Range
Properties, save the workbook, close it, open it back up, change the
password, Re-check the save password box, and again save the workbook.
Repeat 50 times (once per query).

I've tried opening the workbook in Notepad, and doing a find/replace, but
this results in a corrupted workbook. Any ideas?



I'm new to using controls. Is there a way to have something triggered by looking at the check box control instead of linking a cell to the check box control. IE, refer to a named checkbox and avoid having a cell dependent on a check box and using that dependent cell to trigger events.

I want to put (control toolbox) check boxes in each cell in a long col.

Each check box is to be linked to the cell next to it.

What is the easiest way to do this ( i dont want to have to manually change the cell each check box is linked to)

is there a way to make the linked cells progress by draging the check box, or some other way?

What I want to do is put in a check box that when checked cell A2 has the same thing as A1. I'm not great at vb but I tried something like this: If checkbox1 = true then a2 = a1. I'm not quite sure how to reference the cells or say the last part.

Hello all

I have a sub linked to a check box, that if you select it, it will ask for a new value for B8, when you unselect it it returns it back to the same value as C5.

My problem is that if you update C5, B8 does not update automatically unless you select the checkbox twice. Is there a way that when the checkbox is not active the cell are linked?

eg on false ce.FormulaR1C1 = "=R[-3]C[1]" might do it but I'm not sure the syntax?

Sub UpdateCheckbox()
Dim msg As String
If [B9].Value = True Then
msg = InputBox("Line1", "Line2", "%")
[B8] = msg
If [B9].Value = False Then [B8] = [C5] '.Select
End If
End Sub

any thoughts thanks

Hello all,

This is my first post on this board, which has been very helpfull in the past on previous problems. I'm working with Excel 2002 on Windows XP.
This title pretty much captures the main issue: I want to select more than one drop down box at the same time, and copy them as well as rename the cells they refer to.

For example: in A1 there will be a box with LinkedCell set to A1 and ListFillRange set to B1:B5. I now want a similar box in A2, with A2 as LinkedCell. However, when I copy past the box in A1, it still refers to A1 and B1:B5 (the last part is ok). I can easily change A1 to A2 by just changing it in the properties, but the thing is that I also need these boxes in A3:A100. Is there any faster way of changing this?
Also, the ListFillRange might expand in the future. Therefor I would like to know if its possible to select the boxes in A1:A100 and change the ListFillRange to B1:B6 for all at once.

I would be very grafefull for a solution!

Thanks for your time,


I'm using check boxes to set conditional formats for the cell the appear in.
I have a hefty number of these check boxes appearing and I'm curious if
there's a way to aid in the format control.

When cell functions are copied, the cell designations automatically
increment - is there something simliar to aid in the format control settings
for the check boxes so I don't have to go into each one separately to set the
cell link?

I am building an Excel template. It has one worksheet with data (called
"data") and many worksheets with craphics, built from the "data" sheet. One
sheet with radar-type chart has number of check boxes which control
hiding/unhiding columns. When a cloumn is hided, it does not produce a line
on radar chart or a bar on bar charts. In the legend area user can see names
of all series (=columns), used to build charts. But check boxes have their
texts hard coded.

I need to code a subroutine, which will be executed when a sheet with radar
chart will open. It should assign values to text properties of check boxes
taking, say, text for 1st check box from cell "$I$67", for second from
"$I$68", for 3rd from "$I$69" and so on (I plan to include about 30 of them).
The subroutine can not be executed when the template itself is loaded because
its "data" sheet will be initially empty. Users will PASTE data in it _after_
opening the template (obviously)...

I understand that I can dedicate say 1st checkbox to populate text
properties of other checkboxes, but do not know how to assign a text property
of a check box value from a specific cell on the "data" sheet.

So, my question is actually two fold:

- how to build a code which will be executed upon opening a specific sheet
of a workbook;
- how to set a text property of a check box to value from a specific cell on
the "data" sheet.

Thank you in advance.

I have a pre-made form, and I it has a check box with the title "trade for
service" next to it. I need to change that title, and can not get to the
cell to change that. The sheet is unprotected, but I can not change it.

See Attachment.

On the complaints table tab row 9 I have set up a formula to count the amount of complaints received in each month. That row will be hidden with row 8 picking up what is being shown in row 9.

For the months where there are no complaints, i want to be able to tick the check boxes, and once they have been ticked a zero will appear in the blank cells in row 8.

Thank you for any help you are able to give me. Cheers!!

No luck finding an answer? You could always try Google.