ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Custom Toolbars (https://www.excelbanter.com/excel-programming/348874-custom-toolbars.html)

blackfish

Custom Toolbars
 

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?


--
blackfish
------------------------------------------------------------------------
blackfish's Profile: http://www.excelforum.com/member.php...o&userid=29880
View this thread: http://www.excelforum.com/showthread...hreadid=495839


Doug Glancy

Custom Toolbars
 
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

"blackfish" wrote
in message ...

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?


--
blackfish
------------------------------------------------------------------------
blackfish's Profile:

http://www.excelforum.com/member.php...o&userid=29880
View this thread: http://www.excelforum.com/showthread...hreadid=495839





All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com