Hi there,
I'm editing a worksheet that has VB Code for check boxes: the code is this:
Sub AddCheckBox()
Dim cell As Range
DelCheckBox 'Do the delete macro
'or delete all checkboxes in the worksheet
' ActiveSheet.CheckBoxes.Delete
For Each cell In Range("A5:A200")
With ActiveSheet.CheckBoxes.Add(cell.Left, _
cell.Top, cell.Width, cell.Height)
.LinkedCell = cell.Offset(, 1).Address(External:=True)
.Interior.ColorIndex = 37 'or xlNone or xlAutomatic
.Caption = ""
.Border.Weight = xlThin
End With
Next
With Range("A5:A200")
.Rows.RowHeight = 15
End With
End Sub
Sub DelCheckBox()
For Each cell In Range("A5:A200")
Worksheets("Sheet1").CheckBoxes.Delete
Next
End Sub
I have this running in Column A and column B returning the value
I would like to duplicate this process for Columns D & E to create a second set of check boxes however when I try to duplicate the macro (editing the columns from A to D) and run it it merely moves the original check boxes from A to D in the worksheet..
I'm generally good with excel and understand the basics of VB but I'm stumped with this one.. anyone able to help me out with this?
Appreciated
Scar
Bookmarks