Programming code to new object
Hi Martin,
See your other post.
---
Regards,
Norman
"Martin" wrote in message
...
Thank you, but it doesn't work :-(. It show me warning: "Can't get button
property worksheet class". For illustration, there is program:
ActiveSheet.OLEObjects.Add ClassType:="Forms.CommandButton.1",
Link:=False,
DisplayAsIcon:=False, Left:=521.25, Top:=174, Width:=253.5, Height:=34.5
ActiveSheet.OLEObjects("CommandButton1").Object.Ca ption = "Návrat"
ActiveSheet.Buttons("CommandButton1").OnAction = "NavratZpet"
"Norman Jones" wrote:
Hi Martin,
Try:
ActiveSheet.Buttons("Button 1").OnAction = "MyMacro"
---
Regards,
Norman
"Martin" wrote in message
...
I want to create button with some code to worksheet. I can programm
button
but i don't know how can i do action for this button :-(. Do you know
please?
|