• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 453
  • Last Modified:

Share Macro to all spreadsheets on workstation

I have written a VBA macro in Excel which I need make available to any spreadsheet I open.  how can I do this?  We are using Excel 2007 on XP and the user downloads .xlsx spreadsheets which she will need to run the macro on.
0
canuckconsulting
Asked:
canuckconsulting
2 Solutions
 
byundtCommented:
If you put a macro in your Personal.xlsb macro workbook, then it will be available to any other spreadsheet. The Personal.xlsb workbook is opened automatically whenever Excel launches.

First, check to see if you already have one. To do this:
1.  ALT + F11 to open the VBA Editor
2.  Look in the Project Explorer pane on the left for a VBA Project named Personal.xlsb
3.  If you see it, click the + sign next to Modules under Personal.xlsb
4.  Paste the code in one of those module sheets

If you don't have a Personal.xlsb, it is easy to create one:
1.  Use the Macro Recorder to record a macro
Macro Recorder button2.  In the first step of the wizard, choose to store the macro in "Personal Macro Workbook"
Store macro in Personal macro workbook3.  Stop recording the macro (it doesn't have to do anything). You do this by clicking the same Macro Recorder button as in step 1.
4.  Copy code for any macros you want to be available all the time into a module sheet in the newly created Personal.xlsb workbook
0
 
Gregory MillerGeneral ManagerCommented:
Here are some notes on where to find the Personal Macro Workbook since you have an earlier version than the example of 2013 above.
http://wheatblog.com/2011/08/where-is-the-excel-personal-macro-workbook-located/
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now