+ Reply to Thread
Results 1 to 6 of 6

Distributing macros to other users

  1. #1
    Registered User
    Join Date
    11-30-2006
    Posts
    3

    Distributing macros to other users

    Hi,

    I have created an Excel spreadsheet with a few macros that is to be used by a handful of coworkers. I'd like to have them use the spreasheet without lowering their macro security below "High".

    To get around this, I created an Add-In (.xla) which was just a blank worksheet with a module containing the the macros. When I enable the add-in on my computer to test it, however, the macros are not found.

    My question is, how can I access the macros in the add-in? Or, is there another way that other users can access the macros without lowering their security settings?

    I checked into getting a digital signature but that's not worth the cost.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good evening arnblue

    Without seeing your code or the add-in you created it's impossible to say why it's not working correctly. Try pressing Alt+F11 with the file open to enter the VBE and select the ThisWorkbook object and look for the IsAddin setting in the properties window. If it is not true set it to true, save it from the VBE and try again.

    You could also try using gthe windows SelfCert.exe program - do a search to find out where it's sitting. You will be able to get a signature that should enable the other users to accept your program before running it. Not quite as good as a "proper" digital cert but it shouldwork OK.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    I assume that you are trying to run the macros from the Tools\Macros\Run Macro window. You wont be able to do this with an XLA - they are hidden by default. However you can run them from this window. Try tools\Macros\Run Macro and type in the exact name of the macro (no path required). You will see that it will work. The normal way to manage an XLA is to create a custom tool bar, add buttons for each macro, attach the toolbar to the xls before creating the xla.

    BTW, I have had problems myself when doing this when you make changes to the xla/macro names/toolbar after you have distributed the xla. What happens is the toolbar is loaded onto the destination pc when it is first used. When you distribute a new copy of the xla with a change to the toolbar, the old toolbar will appear, not the new toolbar. To overcome this, I normally put an auto close statement in the xla that deletes the toolbar after each session. Then also individually re-attach each button to the macro when the sheet opens. I have found more consistent results using this approach.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Mallycat; 11-30-2006 at 03:49 PM.

  4. #4
    Registered User
    Join Date
    11-30-2006
    Posts
    3
    Thanks for both replies. I should have mentioned that the macros work fine if I save the code in a module under my active workbook. However, this will cause a problem because the code is unsigned, therefore disabled with a High security setting.

    I have confirmed that the IsAddin property is set to True. Also, the certificate created by SelfCert is not exportable and will only work on my local machine.

    Mallycat, I have read that the macros in my .xla will be hidden (not listed) however, when I type the name, the VB editor opens and created a new sub procedure under a new Module in the current workbook.

    Ultimately, I was trying to achieve the macro call by a button imbedded in the users workbook. However you mentioned using the toolbar technique which I haven't tried yet. I'll give that a whirl.

  5. #5
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    Toolbars are much more flexible because they can be used for more than 1 sheet. They are easy to set up too.

    Matt

  6. #6
    Registered User
    Join Date
    11-30-2006
    Posts
    3
    I was able to get the macros working if I used the toolbar method, but only after I lowered my macro security to Medium and then chose to Enable Macros. So the bottom line is that using an Add-In does not get around the digital certificate requirement.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1