ich möchte per VBA Buttons in ein UserForm einfügen und komme da nicht weiter. Kann mir jemand helfen?
Vielen Dank
Karsten
Sub CreateNewCmd()
Dim NewCommandButton As CommandButton
Set NewCommandButton = ThisWorkbook.VBProject.VBComponents("Userform1").designer.Controls.Add(" _
_
Forms.CommandButton.1")
NewCommandButton.Name = "Irgendeinna2me"
NewCommandButton.Caption = Range("A1").Text
NewCommandButton.Top = 2
NewCommandButton.Left = 2
NewCommandButton.Width = 180
NewCommandButton.Height = 30
End Sub