I have seen many different pages on creating shapes and buttons in VBA macros but none of them worked and I'm getting extremely frustrated.
I tried to use:
Dim sortBtn As Object
Set sortBtn = Worksheets("Main").OLEObjects.Add(ClassType:="Forms.CommandButton.1", _
Link:=False, DisplayAsIcon:=False, Left:=200, Top:=100, Width:= 100, Height:=35)
sortBtn.Name = "Test" 'So far this works
Worksheets("Main").Shapes(Test).DrawingObject.Object.Caption = "Test2"
'The above line doesn't work
Please do not redirect me to another question, I have read over a dozen on this site and none have helped me further than this point. With this I would also like to choose where the button is placed. I've also tried the shape method:
Dim sortBtn As Shape
Set sortBtn = Worksheets("Main").Shapes.AppShape(CommandButton1)
I've also tried:
With sortBtn.OLEFormat.Object
.Object.Caption = "Test"
.Name = "Test"
End With
The above also doesn't work with either declaring used above.
Please save me from troubleshooting!

objectsthis works.oleformat.object.caption="test"activesheet.shapes("button 1").oleformat.object.captionworks fine for me. I don't think this is rightSet sortBtn = Worksheets("Main").Shapes.AppShape(CommandButton1)sortBtnand as you are setting this, you can saysortBtn.oleformat.object.caption