Custom Toolbars

B

blackfish

I am trying to write VB code to make custom toolbars and have been
somewhat successful. Is there a way to view the changes you have made
to the custom toolbar without having to save, close and restart the
file?
 
D

Doug Glancy

blackfish,

I'm not sure how you are making your toolbars, but a common approach is to
delete the toolbar before you create it. If you do this then you should be
able to just run the toolbar making subroutine, like this:

Sub test()
Dim cbar As CommandBarPopup

On Error Resume Next
CommandBars("Worksheet Menu Bar").Controls("test").Delete
On Error GoTo 0

Set cbar = CommandBars("Worksheet Menu
Bar").Controls.Add(Type:=msoControlPopup, temporary:=True)
cbar.Caption = "test"
End Sub

hth,

Doug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top