PC Review


Reply
Thread Tools Rate Thread

Distributing macros with an addi-in

 
 
OughtFour
Guest
Posts: n/a
 
      9th Mar 2007
Please lend a hand to someone who has written a fair number of macros for
Word and is now trying to understand the world of Excel.

The macro in question is simple and runs fine.

I've put it in an ad-in with a custom toolbar with the macro on it, and
written a Workbook_AddinInstall() routine in the ThisWorkBook object that
adds a menu item for the macro; also a Workbook_AddinUninstall() that
deletes it.

These macros also behave as expected when run manually from within the vba
editor.

But here is what happens when I install the add-in on another computer and
then add it using the tools > add-ins.

1) The macro is not available using tools > macros.

2) The Workbook_AddinInstall() macro does not run and the menu item is not
added

3) The toolbar is available, but the button no longer runs the macro.

If I open the add-in from within Excel, I can then reassign the macro to the
button on the toolbar and then it will run--for as long as the add-in is
open (not just added in, but actually open using File > Open).

I'm going to skip the code because the code seems to run fine. The problem
is in how I am going about things. Can someone please tell me what the right
way is? (If there is a decent explanation on the web, a link would suffice
and be much appreciated.)

Thank you very much.


 
Reply With Quote
 
 
 
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      9th Mar 2007
This old post of mine about how to install an Excel AddIn might be
helpful:

Tells you where to install it and how to get Excel to see it.

http://groups.google.com/group/micro...faca8e01390c4d

 
Reply With Quote
 
OughtFour
Guest
Posts: n/a
 
      12th Mar 2007

----- Original Message -----
From: <(E-Mail Removed)>
Newsgroups: microsoft.public.excel.programming
Sent: Friday, March 09, 2007 7:41 PM
Subject: Re: Distributing macros with an addi-in


> This old post of mine about how to install an Excel AddIn might be
> helpful:
>
> Tells you where to install it and how to get Excel to see it.


Thank you for your reply. I've done the basic stuff you write
about--installed the add-in and linked to it and all that. My problems are
elsewhere, I think (Why won't macros load?). But thanks anyway.


 
Reply With Quote
 
paul.robinson@it-tallaght.ie
Guest
Posts: n/a
 
      12th Mar 2007
Hi
Is the Workbook_AddinInstall() called by the Workbook_Open sub? Also,
what is the macro security level set at on the other PC (you need to
click on "Trust Access to Visual Basic Project" in the trusted
Publishers tab in macro security)
regards
Paul

On Mar 9, 5:52 pm, "OughtFour" <lus...@nospam.com> wrote:
> Please lend a hand to someone who has written a fair number of macros for
> Word and is now trying to understand the world of Excel.
>
> The macro in question is simple and runs fine.
>
> I've put it in an ad-in with a custom toolbar with the macro on it, and
> written a Workbook_AddinInstall() routine in the ThisWorkBook object that
> adds a menu item for the macro; also a Workbook_AddinUninstall() that
> deletes it.
>
> These macros also behave as expected when run manually from within the vba
> editor.
>
> But here is what happens when I install the add-in on another computer and
> then add it using the tools > add-ins.
>
> 1) The macro is not available using tools > macros.
>
> 2) The Workbook_AddinInstall() macro does not run and the menu item is not
> added
>
> 3) The toolbar is available, but the button no longer runs the macro.
>
> If I open the add-in from within Excel, I can then reassign the macro to the
> button on the toolbar and then it will run--for as long as the add-in is
> open (not just added in, but actually open using File > Open).
>
> I'm going to skip the code because the code seems to run fine. The problem
> is in how I am going about things. Can someone please tell me what the right
> way is? (If there is a decent explanation on the web, a link would suffice
> and be much appreciated.)
>
> Thank you very much.



 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      12th Mar 2007
I had a Workbook_AddinInstall method so I could go back and forth
between developing in an Excel Workbook and then later saving my work
as an AddIn.

Workbook_AddinInstall wasn't needed to actually install the AddIn.

I forget what others had to set their security at.

On Mar 12, 7:13 am, paul.robin...@it-tallaght.ie wrote:
> Hi
> Is the Workbook_AddinInstall() called by the Workbook_Open sub? Also,
> what is the macro security level set at on the other PC (you need to
> click on "Trust Access to Visual Basic Project" in the trusted
> Publishers tab in macro security)
> regards


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Distributing a form with no macros =?Utf-8?B?THVwZQ==?= Microsoft Word Document Management 2 24th May 2007 01:16 PM
Distributing Word Form with VBA Macros =?Utf-8?B?U2NvdHQ=?= Microsoft Word Document Management 1 5th Jul 2006 04:07 PM
Distributing macros by installing an Addin help_wanted Microsoft Excel Programming 2 30th Mar 2004 10:34 AM
Distributing Macros Carm Microsoft Excel Programming 1 2nd Sep 2003 06:05 AM
preserving type library references when distributing macros gene Microsoft Excel Programming 0 11th Jul 2003 02:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:35 AM.