Automatically update cell link of activex checkboxes

Empirer

New Member
Joined
Oct 15, 2020
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

Would like your help on a vba code that would update the cell link of activex checkboxes for each row.
I currently have 3 checkboxes in AL2, each of the checkboxes link to a different column; first checkbox links to column AN2, second links to AO2, third links to AP2.
When copying down the checkboxes up to row 100, the cell links remains linked to row 2.

Kindly assist in providing a vba to update these cell links.
 
Change the b in "Checkbox" to upper case so the line is
Rich (BB code):
If TypeName(chkBox.Object) = "CheckBox" Then

added this Edit:
How did I discover that ?
I ran the code one line at a time using the F8 key and saw that nothing was satisfying the If statement.
 
Last edited:
Upvote 0
Solution

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Change the b in "Checkbox" to upper case so the line is
Rich (BB code):
If TypeName(chkBox.Object) = "CheckBox" Then

added this Edit:
How did I discover that ?
I ran the code one line at a time using the F8 key and saw that nothing was satisfying the If statement.
Thank you, works like a charm. Apologies for my sloppy mistake.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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