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.
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.
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.
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
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)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.