The addins tab of the ribbon should be shown when excel finds an addin. It
always shows up for me with my addins are loaded.
I don't have a guess why it doesn't show up for you or TDK.
JohnM wrote:
All macros are enabled - I have triple checked. I can run them in the
VBA editor and all the Add-in code is effective except that which
displays and hides the toolbar. It executes in step through mode but
no toolbar appears.
I have found an Add-ins tab. This is accessible through customization
of the Quick Launch toolbar and gives me three icons: custom toolbars,
menu commands and toolbar commands. (eg first's icon shows 3
rectangles superimposed upon one another). Inside each is a drop down
space with a button marked "c..."/"m..." etc at the bottom. Clicking
this has no effect. Running my add toolbar code does not add a toolbar
to any of these.
I am guessing this is NOT the Add-ins ribbon tab you expect me to see.
I also guess that the Add-ins tab should appear after Developer tab
but it's not there! [I guess this because in various screen shots in
the help I can see an Add-in Tab after the Develop tab]
Is this perhaps an Office version issue?
If not how do I get it to display.
---
I've also tried saving my add-in as an "xlam" file. That makes no
difference. In either case my Add-in appears in the list of "active"
add-ins but no toolbar.
I think my problem boils down to finding out how to enable the Add-in
tab of the ribbon. If I can do that I am guessing my problem will be
solved.
PS: I am sending this from my gmail account. I normally prefer to use
a newsreader because I more easily avoid spam but I'm at work.
If you allow macros to run when you open this workbook that owns the code, then
you should see the toolbar in the Addins (not developer) tab of the ribbon.
My guess is that you're not noticing the warning that macros are disabled (until
you allow them) when you open this workbook. Could I be right?
John M wrote:
Thanks for response
There is code in the workbook to add and remove the toolbars:
Module: basAutostart
---------------
Sub Aut
pen()
Call CreateMenubar
End Sub
Sub Auto_Close()
Call RemoveMenubar
End Sub
--------------
The sub CreateMenubar checks for a pre-existing toolbar then adds the
correct number of buttons. Here's the critical snippet:
-------------
With Application.CommandBars.Add
.Name = "xxxxx" '<---- anonymised 2009
.Protection = msoBarNoProtection
.Visible = True
.Position = msoBarTop
For i = LBound(vMacNames) To UBound(vMacNames)
With .Controls.Add(Type:=msoControlButton)
.OnAction = "'" & ThisWorkbook.Name & "'!" & vMacNames(i)
.Caption = vCapNames(i)
.Style = msoButtonCaption
.FaceId = 71 + i
.TooltipText = vTipText(i)
End With
Next i
End With
-------------
Clearly vMacNames etc are variant arrays. Perhaps my problem isthe method
chosen to invoke "CreateMenubar". Is "Aut
pen" the right event for Excel
2007?
I have a few workbooks that create the toolbars on the fly when the
workbook is
opened. And delete them when the workbook closes. If I allow macros to
run,
then these toolbars will appear the Addin's tab in xl2007.
(I've never attached a toolbar to a workbook to see how that works in
xl2007,
though. And I'm not sure how you created your toolbar.)
Saved from a previous post:
Your life will become much simpler if you include code to create the
toolbar
when the workbook is opened and include code to destroy the toolbar when
the
workbook is closed.
For additions to the worksheet menu bar, I really like the way John
Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm
Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)
In xl2007, those toolbars and menu modifications will show upunder the
addins.
And if you use xl2007:
If you want to learn about modifying the ribbon, you can start at Ron de
Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm--For macros for all workbooks(saved
as an
addin)
or
http://www.rondebruin.nl/2007addin.htm
John M wrote:
I've got an addin written a few years ago. Unfortunately itdoesn't want
to
work in Office 2007, due to the fact that there are no toolbars anymore.
How
do I expose the Sub Procedures within the addin to a user, so they can
execute them, without using a toolbar?
Many thanks