Hey guys, im working on an xls in excel 2003 and having some trouble with checkboxes, i found the following code on the net to add checkboxes via the sheet macro, it works kinda however as i get further down the page the checks arent lining up with the rows, doesnt seem to matter if i start down there either? and the ones i just created (10 in a row starting at row 78) wont delete now by code or by hand!? if i try by code it throws an error at the deleting sub "Runtime error '9' subscript out of range", heres the code i modified:
Code:
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("c78:c90")
With ActiveSheet.CHECKBOXES.Add(cell.Left, _
cell.Top, cell.Width, cell.Height)
.LinkedCell = cell.Offset(, 0).Address(External:=True)
'.Interior.ColorIndex = 1 'or xlNone or xlAutomatic
.Caption = ""
'.Border.Weight = xlThin
End With
Next
End Sub
Sub DelCheckBox()
For Each cell In Range("c78:c90")
Worksheets("Sheet1").CHECKBOXES.Delete
Next
End Sub