Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove CommandBar Button PPT VBA 2000

Status
Not open for further replies.

Publishing

Technical User
Oct 17, 2002
32
GB
Hopefully just a quick one.
I've created a button using the code below, but I'm stuck on how to correctly remove it with the Auto_Close,

i've thought about using
Application.CommandBars("Standard").Controls(1).Delete
But that'll delete the wrong button if my button isn't there.

Any help would be greatly appreciated.


Sub Auto_Open()

Set myBar = CommandBars("Standard")
Set Wealth01 = myBar.Controls _
.Add(Type:=msoControlButton, Before:=1)
Wealth01.FaceId = 482
Wealth01.OnAction = "WMToolbar"

End Sub

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top