ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create Toolbar with VBA (https://www.excelbanter.com/excel-programming/352268-create-toolbar-vba.html)

AMK4[_32_]

Create Toolbar with VBA
 

How dos one go about creating a new toolbar with VBA? Everything
found online talks about creating custom menus, but that's not what
want. I want a toolbar that I can then have floating, or docked at th
top or bottom of the screen. Pointers anyone

--
AMK
-----------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...fo&userid=1914
View this thread: http://www.excelforum.com/showthread.php?threadid=50796


Tushar Mehta

Create Toolbar with VBA
 
Toolbars and menus use the same underlying architectu commandbars.

Even the main menu you see is a commandbar. In XL, the base menu is a
commandbar named "Worksheet Menu bar".

It's only a question of whether you start with a new commandbar or add a
commandbarpopup or a commandbarbutton in an existing commandbar.

See XL VBA help for the 'Add Method' In there select the dropdown 'Add
method as it applies to the CommandBarControls object.' and also see the
corresponding example. The example actually describes how to create a new
commandbar.

You can also visit John Walkenbach's site, particularly http://www.j-
walk.com/ss/excel/tips/commandbars.htm

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , AMK4.22mvey_
says...

How dos one go about creating a new toolbar with VBA? Everything I
found online talks about creating custom menus, but that's not what I
want. I want a toolbar that I can then have floating, or docked at the
top or bottom of the screen. Pointers anyone?


--
AMK4
------------------------------------------------------------------------
AMK4's Profile:
http://www.excelforum.com/member.php...o&userid=19143
View this thread: http://www.excelforum.com/showthread...hreadid=507964



AMK4[_33_]

Create Toolbar with VBA
 

Thanks Tushar. That gave a good start. Now, 2 questions:

- when one goes to the Add-Ins... menu and they get a list of all
available add-ins, when you select one there's a little description box
at the bottom of that window. Where do I set the text that goes in
there?

- How do I force the name that shows up to start lowercase instead of
upper? The xla file I've created is called 'xlCookies Toolbar', yet in
the Add-Ins menu it shows up as 'Xlcookies Toolbar' It always seems to
want to run the equivalent of .Proper on the name.


--
AMK4
------------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...o&userid=19143
View this thread: http://www.excelforum.com/showthread...hreadid=507964


Bob Phillips[_6_]

Create Toolbar with VBA
 

"AMK4" wrote in message
...

Thanks Tushar. That gave a good start. Now, 2 questions:

- when one goes to the Add-Ins... menu and they get a list of all
available add-ins, when you select one there's a little description box
at the bottom of that window. Where do I set the text that goes in
there?


Make the add-in not an addin, set the IsAddin property of the ThisWorkbook
object to False in the VBIDE, and then in Excel, menu FileProperties, and
set the comments. Then make an addin again.

- How do I force the name that shows up to start lowercase instead of
upper? The xla file I've created is called 'xlCookies Toolbar', yet in
the Add-Ins menu it shows up as 'Xlcookies Toolbar' It always seems to
want to run the equivalent of .Proper on the name.


How are you creating it/naming it. I have add-ins that start with a
lower-case letter.



AMK4[_34_]

Create Toolbar with VBA
 

Bob Phillips Wrote:
Make the add-in not an addin, set the IsAddin property of the
ThisWorkbook
object to False in the VBIDE, and then in Excel, menu FileProperties,
and
set the comments. Then make an addin again.


Aha! That worked. And, it also fixed the other problem with the
lower/uppercase naming. Thank you!


--
AMK4
------------------------------------------------------------------------
AMK4's Profile: http://www.excelforum.com/member.php...o&userid=19143
View this thread: http://www.excelforum.com/showthread...hreadid=507964



All times are GMT +1. The time now is 01:54 PM.

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