Sub 批量加入复选框()
Application.ScreenUpdating = False
Dim rng As Range
For Each rng In Selection
With rng
With Sheet1.CheckBoxes.Add(.Left, .Top, .Width, .Height) '.Select
.Value = xlOff
.LinkedCell = rng.Offset(0, 1).Address
End With
End With
Next
Application.ScreenUpdating = True
End Sub
Sub 批量删除复选框()
Dim obj As Shape
For Each obj In Sheet1.Shapes
If obj.Name Like "Check*" Then obj.Delete
Next
End Sub
Sub 批量修改连接单元格()
Application.ScreenUpdating = False
Dim obj As Shape
For Each obj In Sheet1.Shapes
If obj.Name Like "Check*" Then
obj.Select
With Selection
.Value = xlOff
.LinkedCell = Range(obj.TopLeftCell.Address).Offset(0, 1).Address
End With
End If
Next
Application.ScreenUpdating = True
End Sub