jclarkpowereng
Programmer
I am adding a commandbutton to a Excel worksheet with the following command:
OutputSheet.OLEObjects.Add(ClassType:="Forms.CommandButton.1", Link:=False,
DisplayAsIcon:=False, Left:=150, Top:=1330, Width:=200, Height:=50).Select
It adds the button and names it "CommandButton1".
I want to rename that button (the caption that appears on the button face)
and assign a macro to the button that will run when someone pushes the
button - and am having a hard time doing that with code.
Can you offer any suggestions?
OutputSheet.OLEObjects.Add(ClassType:="Forms.CommandButton.1", Link:=False,
DisplayAsIcon:=False, Left:=150, Top:=1330, Width:=200, Height:=50).Select
It adds the button and names it "CommandButton1".
I want to rename that button (the caption that appears on the button face)
and assign a macro to the button that will run when someone pushes the
button - and am having a hard time doing that with code.
Can you offer any suggestions?