ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I control the order of Custom Toolbars appearing in the Add-Ins Tab of Excel 2007 (https://www.excelbanter.com/excel-discussion-misc-queries/163549-how-do-i-control-order-custom-toolbars-appearing-add-ins-tab-excel-2007-a.html)

Jeffrey W. Smith

How do I control the order of Custom Toolbars appearing in the Add-Ins Tab of Excel 2007
 
Well, I'm not sure if anyone has explored the Beta release of Office 2007 to
be able to answer this question or not, but thought I'd give it a shot. I
have an Add-In that I've developed, compatible with Excel 2000 through Excel
2003 and am looking for a way to control the order of 3 Custom Toolbars the
Add-in deploys in the Add-Ins Tab of Excel 2007's "Ribbon". After quite a
bit of finagling, the present code makes use of the following approach (not
actually what I'm using because I had to monkey around with it and repeat
some of the code because it didn't always work across all 3 Excel versions
without the repetitive code, but it should suffice to convey the method):

With Application.CommandBars("1st Toolbar")
..Enabled = True
..Visible = True
..Position = msoBarTop
..Left = 0
End With
With Application.CommandBars("2nd Toolbar")
..Enabled = True
..Visible = True
..RowIndex = 2
..Left = 0
End With
With Application.CommandBars("3rd Toolbar")
..Enabled = True
..Visible = True
..RowIndex = msoBarRowLast
..Left = 0
End With

This code is seemingly ignored in Excel 2007 and the Toolbars are deployed
in a fashion I can't make sense of - I initially thought they might be
sorted alphanumerically and tried renaming the toolbars to see if that was
the trick, but that didn't work either. I also tried reversing the order of
the code but that seemingly had no effect either. If anyone has any ideas,
I'd love to hear them.

Thanks,

Jeff



Jeffrey W. Smith

How do I control the order of Custom Toolbars appearing in the Add-Ins Tab of Excel 2007
 
Sorry - dumb copy and paste on this question from when I posted this back
when I was originally having this problem with the Beta release (and didn't
get it solved then). I should have said this problem is persisting in the
current version of Office 2007 with all updates applied.

Jeff


"Jeffrey W. Smith" wrote in message
...
Well, I'm not sure if anyone has explored the Beta release of Office 2007
to be able to answer this question or not, but thought I'd give it a shot.
I have an Add-In that I've developed, compatible with Excel 2000 through
Excel 2003 and am looking for a way to control the order of 3 Custom
Toolbars the Add-in deploys in the Add-Ins Tab of Excel 2007's "Ribbon".
After quite a bit of finagling, the present code makes use of the
following approach (not actually what I'm using because I had to monkey
around with it and repeat some of the code because it didn't always work
across all 3 Excel versions without the repetitive code, but it should
suffice to convey the method):

With Application.CommandBars("1st Toolbar")
.Enabled = True
.Visible = True
.Position = msoBarTop
.Left = 0
End With
With Application.CommandBars("2nd Toolbar")
.Enabled = True
.Visible = True
.RowIndex = 2
.Left = 0
End With
With Application.CommandBars("3rd Toolbar")
.Enabled = True
.Visible = True
.RowIndex = msoBarRowLast
.Left = 0
End With

This code is seemingly ignored in Excel 2007 and the Toolbars are deployed
in a fashion I can't make sense of - I initially thought they might be
sorted alphanumerically and tried renaming the toolbars to see if that was
the trick, but that didn't work either. I also tried reversing the order
of the code but that seemingly had no effect either. If anyone has any
ideas, I'd love to hear them.

Thanks,

Jeff





All times are GMT +1. The time now is 07:13 AM.

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