Sure; set the OnAction property of the control, e.g.,
Code:
--------------------
Set cControl = Application.CommandBars("Worksheet Menu bar").Controls.Add
With cControl
.Caption = "&Copy Rng"
.Style = msoButtonCaption
.OnAction = "ShowRangeToClipboardForm"
End With
--------------------
--
shg
------------------------------------------------------------------------
shg's Profile:
http://www.thecodecage.com/forumz/member.php?userid=13
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=37949