dimanche 18 septembre 2016

Return CheckBoxes.LinkedCell address VBA

I use the following code to automatically generate a new checkbox and link a cell to it:

ActiveSheet.CheckBoxes.Add().LinkedCell = Selection.Address

I want to create another sub which should change the background color of the .LinkedCell cell of the checkbox when the checkbox is checked (blue) or unchecked (red). I will have about 200 checkboxes in the worksheet.

Is there a way to get/return the .LinkedCell address of the currently checked/unchecked checkbox so that the sub can change the background color of that cell? Thank you.




Aucun commentaire:

Enregistrer un commentaire