ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sharing/Exporting a custom tool bar (https://www.excelbanter.com/excel-programming/405313-sharing-exporting-custom-tool-bar.html)

Steve P[_2_]

Sharing/Exporting a custom tool bar
 
Hi,
I have developed a custom toolbar that acts as a user interface to run
commonly used macros.

How can I export this toolbar and the corresponding macros to allow someone
else in my department for usage?


Please advise.

Jim Cone

Sharing/Exporting a custom tool bar
 
"Attach " the toolbar to the workbook (search help for "attach toolbar").
The macros should be in the workbook that has the toolbar attached.

In the ThisWorkbook code module add code to delete the toolbar when
the workbook closes and show it when the workbook opens....
'--
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Steve's Toolbar Name").Delete
End Sub
'--
Private Sub Workbook_Open()
Application.CommandBars("Steve's Toolbar Name").Visible = True
End Sub
'--
NOTE: that if you make any changes to the toolbar you have to remove
the existing toolbar and attach the revised one!
You can now send a copy of the workbook to others.

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Steve P"
wrote in message
Hi,
I have developed a custom toolbar that acts as a user interface to run
commonly used macros.

How can I export this toolbar and the corresponding macros to allow someone
else in my department for usage?


Please advise.


All times are GMT +1. The time now is 05:09 PM.

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