ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking Check boxes to rows in another column? (https://www.excelbanter.com/excel-programming/437514-linking-check-boxes-rows-another-column.html)

Doug

Linking Check boxes to rows in another column?
 
I currently have data in columns A through CQ. The problem I am having is
that the cells in columns Q through CQ are all vlookups and when they change
per the import data they are referenced to it sometimes shifts the rows on
the sheet. Then the personal entries I make in columns A through P don't line
up. When there is an update to the reference data I will often find my
personal entries in each row for Columns A through P either above or below
where they are suppose to be. How can I accomplish this goal?

I have used this macro to place checkboxes in all of column A for each
respective row, but is there a way to reference each checked box to a column
or all the columns Q through CQ. If not please tell me if you know another to
keep my personal entries in A through P from moving up and down rows?

Sub CheckBoxes()
'Creates check boxes in a particular range

LinkedColumn = "A"
BoxColumn = "A"
BoxLeft = Range(BoxColumn & "1").Left
Boxwidth = Range(BoxColumn & "1").Width

For RowCount = 3 To 1000
BoxTop = Range(BoxColumn & RowCount).Top
BoxHeight = Range(BoxColumn & RowCount).Height

Set bx = ActiveSheet.CheckBoxes.Add( _
Left:=BoxLeft, Top:=BoxTop, Width:=Boxwidth, Height:=BoxHeight)

bx.LinkedCell = LinkedColumn & RowCount
Range(LinkedColumn & RowCount) = True
Next RowCount
End Sub
--
Thank you!


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com