ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Custom Toolbar (https://www.excelbanter.com/excel-programming/318842-custom-toolbar.html)

Darin Kramer

Custom Toolbar
 

I have created a custom Toolbar - with three Custom Buttons on, each
running a Macro within the workbook. I want to be able to email the
workbook to several users who need to use the Macros (by clicking the
appropriate button on the toolbar) Problem is when I email it to another
user, firstly he can not see the custom toolbar... then if he right
clicks on the top part of Excel and makes the toolbar visible...none of
the buttons are still inside... (but the Macros obviously have followed
the workbook around...)
Any Ideas...? (I know it works with text boxes.. but that clutters the
screen and not on different sheets within workbooks....

Thanks again

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

Custom Toolbar
 
Here is an article which talks about attaching toolbars:


http://www.microsoft.com/exceldev/articles/toolbatt.htm


Here is an article about creating commandbars with code:
http://msdn.microsoft.com/library/techart/ofcmdbar.htm


Here is another article or two you might find useful:
http://msdn.microsoft.com/library/ba...n_addins97.htm

http://www.microsoft.com/exceldev/tips/addins.htm



--
Regards,
Tom Ogilvy

"Darin Kramer" wrote in message
...

I have created a custom Toolbar - with three Custom Buttons on, each
running a Macro within the workbook. I want to be able to email the
workbook to several users who need to use the Macros (by clicking the
appropriate button on the toolbar) Problem is when I email it to another
user, firstly he can not see the custom toolbar... then if he right
clicks on the top part of Excel and makes the toolbar visible...none of
the buttons are still inside... (but the Macros obviously have followed
the workbook around...)
Any Ideas...? (I know it works with text boxes.. but that clutters the
screen and not on different sheets within workbooks....

Thanks again

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Darin Kramer

Custom Toolbar
 


Works fantastic!!!! ... Follow up question is I want to add TWO buttons
instead of one....

I think the relevant part of the VBA script isis :

' Add command button control to the control's
' collection of CommandBar objects.
With cbrCommandBar.Controls
Set cbcCommandBarButton = _
.Add(msoControlButton)

If I want to add another button can I just reapeat the last line,
ie.Add(msoControlButton2) (I would assume u need to call it 2...?

Thanks

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

Custom Toolbar
 
Yes, you just repeat the command.

--
Regards,
Tom Ogilvy

"Darin Kramer" wrote in message
...


Works fantastic!!!! ... Follow up question is I want to add TWO buttons
instead of one....

I think the relevant part of the VBA script isis :

' Add command button control to the control's
' collection of CommandBar objects.
With cbrCommandBar.Controls
Set cbcCommandBarButton = _
.Add(msoControlButton)

If I want to add another button can I just reapeat the last line,
ie.Add(msoControlButton2) (I would assume u need to call it 2...?

Thanks

D



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 02:46 PM.

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