Publishing
Technical User
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 Autpen()
Set myBar = CommandBars("Standard")
Set Wealth01 = myBar.Controls _
.Add(Type:=msoControlButton, Before:=1)
Wealth01.FaceId = 482
Wealth01.OnAction = "WMToolbar"
End Sub
Many thanks
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 Autpen()
Set myBar = CommandBars("Standard")
Set Wealth01 = myBar.Controls _
.Add(Type:=msoControlButton, Before:=1)
Wealth01.FaceId = 482
Wealth01.OnAction = "WMToolbar"
End Sub
Many thanks