LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Creating a custom toolbar add-in in Excel 2007

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I have more than 1 custom toolbar add-in in Excel 2007? Tracey Excel Discussion (Misc queries) 1 February 18th 10 05:48 AM
Delete a custom toolbar in excel 2007 from Add-Ins mmmaaatttsss Setting up and Configuration of Excel 2 October 4th 09 11:13 PM
How do I set up a custom toolbar in Excel 2007? est_da Excel Discussion (Misc queries) 5 May 11th 08 09:47 PM
Excel 2007 Error 400 from custom toolbar Phil A.[_2_] Excel Programming 2 October 7th 07 10:10 PM
Backup custom toolbar in excel 2007, how? dk_ Excel Discussion (Misc queries) 6 September 4th 07 02:33 AM


All times are GMT +1. The time now is 06:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"