Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro Available When Opening Excel

Status
Not open for further replies.

Katy

Technical User
Apr 26, 2001
39
0
0
CA
How do you make an excel macro available everytime you open excel? A macro is available when I open a particular workbook, but I don't want to have to open that workbook in order to run it.
 
Katy,

Place it in your personal.xls file.

Hope this helps.
 
Create the workbook "personal.xls", put the macro in it and save the file in the "\Program Files\Microsoft Office\Office\XLStart" folder.

Excel looks for this and opens it as a hidden workbook when it is started. You need to unhide it to edit macros in it but you can run them with it hidden.

Peter Richardson
 
Thanks, that's the file I have to open first. How do I get 'personal.xls' to be available when I open excel (so I have access to the macro I want for all workbooks). Basically I import data, bring it into an excel spreedsheet and run a macro to format it. I don't want to open personal.xls first in order to run the macro, but that's the only way I can see the macro now.
 
Thank you - it worked.

Katy
 
Easiest way to create personal.xls is to record a dummy macro using the macro recorder, and select "in personal.xls" as the macro location. Excel will create the workbook for you, in the correct location, so that it will be automatically opened every time you start Excel.
Rob
[flowerface]
 
The personal.xls file as placed in the beforementioned directory will auto open EVERY time MS XL opens. Its always opened hidden which is why no one realizes that it's there.

Based on the previous posts this should already be doing what you desire, if not, try starting from scratch and record a dummy macro, say AVAILABLE IN ALL WORKBOOKS> This is how XL will default create the personal workbook for you , then you can edit and paste your desired code in there. In your code make sure you do
Public sub mysubroutine, (if it says private, that may be one reason you can't 'see' it)

hope this helps [yinyang] Tranpkp [pc2]
 
Katy
You could also create a new dropdown menu say named Macros, and place your macro there for easy access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top