Forum Discussion

craboak's avatar
craboak
Copper Contributor
Aug 18, 2021
Solved

VBA/Macro Code for checkboxes

Forgive me but I am new to VBA/Macro writing for Excel. What I am trying to accomplish:  I would like to be able to select check boxes en masse in a column and set them to link with the cells they a...
  • craboak 

    You may simply try this...

     

    Sub SetLinkedCells()
    Dim cb As CheckBox
    
    For Each cb In ActiveSheet.CheckBoxes
        cb.LinkedCell = cb.TopLeftCell.Address
    Next cb
    
    End Sub

Resources