ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   AddIns (https://www.excelbanter.com/excel-discussion-misc-queries/35658-addins.html)

bill_morgan

AddIns
 
I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...



Kassie

Hi Bill

Although you may not see it, it is available to you. If you hit<Alt<F8,
and type in the name of the macro it will run

"bill_morgan" wrote:

I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...



bill_morgan

Kassie, thanks for your response. When I hit <Alt<F8 the macro dialog box
comes up - typing in the Add-In name has no effect. This is an *.xla file,
not a macro. Am I missing something?

How can I get my add-in to appear in the Tools drop down menu just like the
3rd party add-in? I can't figure out what is different between the two
add-ins.

Thanks again ...

"Kassie" wrote:

Hi Bill

Although you may not see it, it is available to you. If you hit<Alt<F8,
and type in the name of the macro it will run

"bill_morgan" wrote:

I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...



Kassie

Hi Bill

What does this add in do?

"bill_morgan" wrote:

Kassie, thanks for your response. When I hit <Alt<F8 the macro dialog box
comes up - typing in the Add-In name has no effect. This is an *.xla file,
not a macro. Am I missing something?

How can I get my add-in to appear in the Tools drop down menu just like the
3rd party add-in? I can't figure out what is different between the two
add-ins.

Thanks again ...

"Kassie" wrote:

Hi Bill

Although you may not see it, it is available to you. If you hit<Alt<F8,
and type in the name of the macro it will run

"bill_morgan" wrote:

I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...



Dave Peterson

Do you mean in the tools|macro|macros dialog?

If yes, then Kassie has one solution.

If you meant you wanted it added to the bottom of the Tools dropdown, you have
to put it there.

One way is via code kind of like this:

Option Explicit
Sub auto_open()

Dim ctrl As CommandBarControl

On Error Resume Next
Application.CommandBars("worksheet menu bar") _
.Controls("tools").Controls("Hi There").Delete
On Error GoTo 0

Set ctrl = Application.CommandBars("worksheet menu bar") _
.Controls("Tools").Controls.Add(temporary:=True)

With ctrl
.Caption = "Hi There"
.OnAction = ThisWorkbook.Name & "!MyMacro"
End With

End Sub
Sub auto_close()
On Error Resume Next
Application.CommandBars("worksheet menu bar") _
.Controls("tools").Controls("Hi There").Delete
On Error GoTo 0
End Sub
Sub myMacro()
MsgBox "Hi, from myMacro"
End Sub



==========
If you get lots of macros, you may want to use something like:

If you want to give the user a nicer interface to run your macros...

John Walkenbach's menumaker:
http://j-walk.com/ss/excel/tips/tip53.htm
to add items to the worksheet menubar.

If I want to add a toolbar of my own, here's how I do it:
http://groups.google.co.uk/groups?th...5B41%40msn.com

bill_morgan wrote:

I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...


--

Dave Peterson

bill_morgan

Kassie,

I designed another add-in that is simply a recorded macro. Now it works as
you suggested.

The orginal macro was a private sub procedure in the This_Workbook module
that posted the full name and path of the workbook to the bottom left footer
(Excel 2000). That's probably why I couldn't run it from the macro dialog
box. Here's the code for the original add-in :

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End Sub

Is there a way to make use of this code as an add-in, and also have it
appear on the Tools drop down menu?

Thanks again for your help.


"Kassie" wrote:

Hi Bill

What does this add in do?

"bill_morgan" wrote:

Kassie, thanks for your response. When I hit <Alt<F8 the macro dialog box
comes up - typing in the Add-In name has no effect. This is an *.xla file,
not a macro. Am I missing something?

How can I get my add-in to appear in the Tools drop down menu just like the
3rd party add-in? I can't figure out what is different between the two
add-ins.

Thanks again ...

"Kassie" wrote:

Hi Bill

Although you may not see it, it is available to you. If you hit<Alt<F8,
and type in the name of the macro it will run

"bill_morgan" wrote:

I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...



bill_morgan

Dave,

Hi ...

I meant the latter - adding it to the bottom of the tools drop down, and you
have answered the question. I was under the mistaken impression that the
add-in should automatically appear there once I opened (checked) it. Now I
realize I need to write some code to make it happen.

Thanks to both you and Kassie for your very useful assistance.

"Dave Peterson" wrote:

Do you mean in the tools|macro|macros dialog?

If yes, then Kassie has one solution.

If you meant you wanted it added to the bottom of the Tools dropdown, you have
to put it there.

One way is via code kind of like this:

Option Explicit
Sub auto_open()

Dim ctrl As CommandBarControl

On Error Resume Next
Application.CommandBars("worksheet menu bar") _
.Controls("tools").Controls("Hi There").Delete
On Error GoTo 0

Set ctrl = Application.CommandBars("worksheet menu bar") _
.Controls("Tools").Controls.Add(temporary:=True)

With ctrl
.Caption = "Hi There"
.OnAction = ThisWorkbook.Name & "!MyMacro"
End With

End Sub
Sub auto_close()
On Error Resume Next
Application.CommandBars("worksheet menu bar") _
.Controls("tools").Controls("Hi There").Delete
On Error GoTo 0
End Sub
Sub myMacro()
MsgBox "Hi, from myMacro"
End Sub



==========
If you get lots of macros, you may want to use something like:

If you want to give the user a nicer interface to run your macros...

John Walkenbach's menumaker:
http://j-walk.com/ss/excel/tips/tip53.htm
to add items to the worksheet menubar.

If I want to add a toolbar of my own, here's how I do it:
http://groups.google.co.uk/groups?th...5B41%40msn.com

bill_morgan wrote:

I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...


--

Dave Peterson


Dave Peterson

John Walkenbach has an addin that you may want to review. It's a little like
yours, but on steroids.

http://j-walk.com/ss/excel/files/addpath.htm

bill_morgan wrote:

Kassie,

I designed another add-in that is simply a recorded macro. Now it works as
you suggested.

The orginal macro was a private sub procedure in the This_Workbook module
that posted the full name and path of the workbook to the bottom left footer
(Excel 2000). That's probably why I couldn't run it from the macro dialog
box. Here's the code for the original add-in :

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End Sub

Is there a way to make use of this code as an add-in, and also have it
appear on the Tools drop down menu?

Thanks again for your help.

"Kassie" wrote:

Hi Bill

What does this add in do?

"bill_morgan" wrote:

Kassie, thanks for your response. When I hit <Alt<F8 the macro dialog box
comes up - typing in the Add-In name has no effect. This is an *.xla file,
not a macro. Am I missing something?

How can I get my add-in to appear in the Tools drop down menu just like the
3rd party add-in? I can't figure out what is different between the two
add-ins.

Thanks again ...

"Kassie" wrote:

Hi Bill

Although you may not see it, it is available to you. If you hit<Alt<F8,
and type in the name of the macro it will run

"bill_morgan" wrote:

I installed a 3rd party Add_In through Tools/Add_Ins/Browse ... and then
clicked OK. The new Add_In name now appears in the Tools drop down menu.

So far so good.

Then I created my own Add_In (.xla file). I followed the same procedure as
above, but my own Add_In does not appear in the Tools drop down menu even
though its box is checked in the Add_Ins Available dialog box.

What further steps do I need to take to get my new Add_In to appear in the
Tools drop down list?

Thanks for your help ...



--

Dave Peterson


All times are GMT +1. The time now is 04:09 PM.

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