Sub AddButtons()
Dim btn As Button
Dim rng As Range
Dim r As Long
Const NoButtons As Long = 750
With ActiveSheet
If .Buttons.Count > 0 Then .Buttons.Delete
For r = 2 To NoButtons
Set rng = .Cells(r, "H")
'add buttons for new data only
If UCase(rng.Offset(, -2).Value) <> "OK" Then
Set btn = .Buttons.Add(rng.Left, rng.Top, rng.Width, rng.Height)
With btn
.Caption = "Add"
'pass row argument
.OnAction = "'AddData " & r & "'"
End With
End If
Next r
End With
End Sub
Sub AddData(ByVal lngRow As Long)
Dim objButton As Button
Set objButton = ActiveSheet.Buttons(ActiveSheet.Buttons(Application.Caller).Index)
'copy data
Worksheets("Notice").Cells(lngRow, "F").Copy
Worksheets("Board").Range("A1").End(xlDown).Offset(1).PasteSpecial Paste:=xlPasteValues
'delete button
objButton.Delete
End Sub