Set Buttons = ActiveSheet.Buttons.Add(t.Left, t.Top , t.Width, t.Height)
With Buttons
.OnAction = "Btn3"
.Caption = "Add TestCase to " & sReturn
.Name = "Btn" & i
End With
Hello, I want to add a function to ONAction. It doesn’t work and I get the Basic runtime error 1. I also asked this question on stack overflow vba - Execute a sub Function on a button which is created programatically - Stack Overflow