On the line below, I'm getting the error "Object variable or with block, variable not set" (Error 91).
Set cmd = ActiveWorkbook.VBProject.VBComponents("UserForm1").Designer.Controls.Add("Forms.CommandButton.1", "cmdTst")
Where cmd is defined as
Dim cmd As MSForms.CommandButton