Charles,
Here is a simple example you can build upon. I tend to add in the
Workbook_Open event and remove in the Workbook_BeforeClose.
Public Sub addMenu()
removeMenu 'just in case
With Application.CommandBars("Cell"*)
With .Controls.Add(Type:=msoControl*Button)
.BeginGroup = True
.Caption = "Routine1"
.OnAction = "Another"
End With
With .Controls.Add(Type:=msoControl*Button)
.Caption = "Routine2"
.OnAction = "YetMore"
End With
End With
End Sub
Public Sub removeMenu()
On Error Resume Next
With Application.CommandBars("Cell"*)
.Controls("Routine1").Delete
.Controls("Routine2").Delete
End With
On Error GoTo 0
End Sub
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Charles Jordan" <charles.jordan@btopenworld.com> wrote in message
news:f79a4997.0503140805.33082060@posting.google.com...
> Hi I am trying to manipulate multiple controls on a worksheet plus
> some drawing objects and in the days of XL95 John Walkenbach had a
> marvellous "Power Utility Pak" "Object Properties" tool for altering
> both the location of objects and whether they were Visible/Invisible.
>
> One of its great features was that it was accessible by selecting the
> object and then *right clicking* it. We are now trying to reproduce
> this right click ability but cannot find any code on this NG for doing
> it.
>
> Can any one, (including John) help?. Mr Walkenbach if you are there
> perhaps you could direct us to the page in "Power Programming with
> VBA" although its not immediately obvious that the code for this
> feature is in the book..
>
> (We are running XL 2000, /XP).
>
> Thanks a million
>
> Charles
Bookmarks