Checkboxes - Copying and Changing Cell Link Automatically

mab1284

New Member
Joined
Mar 22, 2010
Messages
23
I have a large spreadsheet with many tasks. Each task is on a separate row with a checkbox to the right of the row. When a user completes a task, they put a check in the checkbox, which then marks the task as complete and grays out the row. All works well with the first check box, however, when I copy/paste the checkbox down, it keeps the same cell reference so when the user checks the first box, it marks all tasks as complete because all check boxes get checked.

Is there any way (other than manually changing each cell reference) to get the check box to automatically reference the correct cell A5, A6, A7, etc. when I copy it down or is there a different way of copying so this works? I would rather not have to do this manually since some jobs have over 100 tasks.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
mab1284,

Perhaps, try this.....

***I am assumng activex checkboxes??

For a given sheet, create your checkboxes so that cb1 is at your first row (row 5) then copy or place next in row 6 etc.

Then, run this macro to set the Linked Cells.

Code:
Sub Linkcells()
Dim shp As Shape
r = 5
For Each shp In ActiveSheet.Shapes
If shp.Type = 12 Then    ' ***type 12 is an Activex checkbox.   edit to 8  if using a form checkbox
r = r + 1
shp.OLEFormat.Object.LinkedCell = "A" & r
End If
Next shp
End Sub

Test it first!!!!

Hope that helps.
 
Upvote 0
Very helpful. I know this is an old post but I do have additional questions.
 
Upvote 0

Forum statistics

Threads
1,222,623
Messages
6,167,114
Members
452,096
Latest member
lordy888

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top