A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Tom:
One way is to loop over checkboxes to see if one has been inserted already:
I would rather use a cell to "remember" the insertion:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim R As Long, shp As CheckBox
Dim r1 As Range, r2 As Range, r3 As Range
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
R = Target.Row
Set r1 = Range("H" & R)
Set r2 = Range("I" & R)
Set r3 = Range("ZZ" & R)
If r3.Value = "X" Then Exit Sub
Application.EnableEvents = False
r3.Value = "X"
ActiveSheet.CheckBoxes.Add(358.5, 93, 41.25, 33).Select
Set shp = Selection
shp.Left = r1.Left
shp.Top = r1.Top
shp.Height = r1.Height
shp.Width = r1.Width
ActiveSheet.CheckBoxes.Add(358.5, 93, 41.25, 33).Select
Set shp = Selection
shp.Left = r2.Left
shp.Top = r2.Top
shp.Height = r2.Height
shp.Width = r2.Width
Target.Offset(1, 0).Select
Application.EnableEvents = True
End Sub