Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been able to create a custom toolbar add-in using vba in Excel 2007
from different examples that I have found on this site. The problem I am running into is the visual layout of the toolbar. My drop down menu buttons stack vertically instead of horizontally. Is there any way to change this? I have a custom add-in that I found on the web that I had used in Excel 2003 and when I install it in 2007, the buttons are displayed horizontally. I can't figure out where in the programming this is done. I have attached some of my code that adds the drop down menus below. Am I doing something wrong? Any help would be great! Thanks, Jason Dim cmdBar As CommandBar Dim cmdBarMenu As CommandBarControl Dim cmdBarMenuItem As CommandBarControl 'drop down - Comments Set cmdBar = Application.CommandBars("Worksheet Menu Bar") Set cmdBarMenu = cmdBar.Controls.Add(Type:=msoControlPopup, befo=cmdBar.Controls("Window").Index) cmdBarMenu.Caption = "Comments" cmdBarMenu.Tag = "JJT" Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "Create rounded comment" .OnAction = "RoundedComment" .Tag = "JJT" .FaceId = 588 End With Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "Change comment color" .OnAction = "ChangeCommentColor" .Tag = "JJT" .FaceId = 1691 End With 'drop down - Formatting Set cmdBar = Application.CommandBars("Worksheet Menu Bar") Set cmdBarMenu = cmdBar.Controls.Add(Type:=msoControlPopup, befo=cmdBar.Controls("Window").Index) cmdBarMenu.Caption = "Formatting" cmdBarMenu.Tag = "JJT" Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "###°" .OnAction = "DegreesFormat" .Tag = "JJT" End With Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "## ###/###" .OnAction = "HPFormat" .Tag = "JJT" End With Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "## ##/##" .OnAction = "InchesFractionalFormat" .Tag = "JJT" End With Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "#,###" .OnAction = "NumberCommaFormat" .Tag = "JJT" End With Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "# ##/##Ø" .OnAction = "DiameterInchesFractionsFormat" .Tag = "JJT" End With Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "##Ø" .OnAction = "DiameterInchesFormat" .Tag = "JJT" End With Set cmdBarMenuItem = cmdBarMenu.Controls.Add With cmdBarMenuItem .Caption = "##.#" .OnAction = "GPMFormat" .Tag = "JJT" End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I have more than 1 custom toolbar add-in in Excel 2007? | Excel Discussion (Misc queries) | |||
Delete a custom toolbar in excel 2007 from Add-Ins | Setting up and Configuration of Excel | |||
How do I set up a custom toolbar in Excel 2007? | Excel Discussion (Misc queries) | |||
Excel 2007 Error 400 from custom toolbar | Excel Programming | |||
Backup custom toolbar in excel 2007, how? | Excel Discussion (Misc queries) |