wbrunner
asked on
VBA-Problem: dynamic gerneration of Buttons in Excel - set the caption?
I want to generate buttons in Excel dynamically.
I did this using:
Set bu = ActiveWorkbook.ActiveSheet .Shapes.Ad dFormContr ol(xlButto nControl, Left:=150, Top:=30, Width:=100, Height:=12)
bu.Name = "Button1"
bu.OnAction = "run1"
But I found no property or method to set the caption of the button. There is always a "Standard Caption" (Schaltfäche ## in German version)
Please don't give me solutions with using OLEObjects.Add("Forms.Comm andButton. 1"),...
I did this using:
Set bu = ActiveWorkbook.ActiveSheet
bu.Name = "Button1"
bu.OnAction = "run1"
But I found no property or method to set the caption of the button. There is always a "Standard Caption" (Schaltfäche ## in German version)
Please don't give me solutions with using OLEObjects.Add("Forms.Comm
ASKER
Where did you find this info? In the docu the DrawingObject does not exist!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
bu.DrawingObject.Caption = "kokoloko"