Consulting

Results 1 to 6 of 6

Thread: Help needed to macro macro global

  1. #1
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location

    Help needed to macro macro global

    I have an Excel macro that I need to make global. I don't want to put it in my Personal.xls file, as I need to share this macro with a number of other people.

    In my Excel file where the macro resides, I have added a toolbar to make it easy to run the macro. What do I need to do to make this macro and toolbar accessible to the other users?

  2. #2
    VBAX Expert Tinbendr's Avatar
    Joined
    Jun 2005
    Location
    North Central Mississippi (The Pines)
    Posts
    993
    Location
    I would:
    1. Create a module of the code you want to share.
    2. Programmically add the menu when opened and removed when closed to the module.
    3. Export module.
    4. Send the exported file to others with instructions on how to import module.

    David

  3. #3
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,873
    Check out making an Add-in.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location
    Thank you for your suggestions. I tried doing an Add-In, but had difficulty making the macro available to other users when they copied the .xla file to their PC.

    I ended up saving the .xls file to the "C:\Documents and Settings\<my name-na>\Application Data\Microsoft\Excel\XLSTART" folder. Then I had to open the file, add a short-cut to my macro, hide the file in Excel, and close it. For each user I had to have them open it in Excel and hide it. Then all were able to user the macro shortcut I had created.

    I also tried adding the macro programmatically to the menu bar or a toolbar, but was unable to figure out how to get that to work. If there are any suggestions on that, I would appreciate it.

    Thanks!

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    If you can get the Add-in on your server, tell your users not to copy to their PCs. Then if you need to update your code, you need only change the Server version.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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