VBA adjustment help needed

wheath

Board Regular
Joined
Jun 17, 2016
Messages
58
Office Version
  1. 365
Platform
  1. Windows
I need to make multiple checkboxes do the same thing ... be linked to the checkboxes on another sheet (Sublist). So that when the checkbox on the Sublist is checked, it automatically checks this checkbox on the sheet Checklist. I also need multiples of that checkbox (B14-B114) This is the code I have but I can't figure out how to link it to the Sublist.

[FONT=&quot]Sub CellCheckbox()
Dim myCell As Range
Dim myRng As Range
Dim CBX As CheckBox[/FONT]

[FONT=&quot]
With ActiveSheet
.CheckBoxes.Delete 'nice for testing!
Set myRng = .Range("A1:A10") 'change to the range you want
End With[/FONT]

[FONT=&quot]
For Each myCell In myRng.Cells
With myCell
Set CBX = .Parent.CheckBoxes.Add _
(Top:=.Top, _
Left:=.Left, _
Width:=.Width, _
Height:=.Height)
CBX.Name = "Allan_" & .Address(0, 0)
CBX.Caption = "" 'or what you want
CBX.Value = xlOff[/FONT]

[FONT=&quot]
'I like to use the same cell as the linked cell
'with a number format of ;;;
'I can't see the true/false in the worksheet, but it
'still appears in the formula bar
CBX.LinkedCell = .Address(external:=True)
.NumberFormat = ";;;"
End With
Next myCell
End Sub[/FONT]
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I am willing to send the spreadsheet to someone and pay them to help me finish this last bit of code I cannot figure out!
 
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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