ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   storing macros ? (https://www.excelbanter.com/excel-discussion-misc-queries/163563-storing-macros.html)

Tim[_7_]

storing macros ?
 
If you create macros in on file/workbook...is there a way to store them
somewhere so they can be used in any other similar workbook that might be
created ? Can you store them in some file and then import/export them to
other files ?

Thanks, Tim



FSt1

storing macros ?
 
hi
save your macro to a workbook named Personal.xls then save that file to the
xl start folder. on my pc the xl start folder is at....
c:\program files\microsoft office\Office10\xlstart
the personal file should be hidden and will open on starting excel and all
macros in the personal workbook will be available. in my personal i have
about 9 macros, 6 of which i run from a custom menu.

hope this helps
regards
FSt1

"Tim" wrote:

If you create macros in on file/workbook...is there a way to store them
somewhere so they can be used in any other similar workbook that might be
created ? Can you store them in some file and then import/export them to
other files ?

Thanks, Tim




Gord Dibben

storing macros ?
 
As Fst1 points out, storing the macros in Personal.xls is a good idea which
makes them available for all open workbooks.

You may have to edit them if they have sheet names or range nameshardcoded.

I personally like to store them in an Add-in so's I don't have to preface them
with the Personal.xls!macroname.

Macroname does the job.

As far as import/export, for info only................

With VBE open you can expoert entire modules to a *.bas file then import that
*.bas file as a module into a project.


Gord Dibben MS Excel MVP

On Thu, 25 Oct 2007 17:43:27 -0700, "Tim" wrote:

If you create macros in on file/workbook...is there a way to store them
somewhere so they can be used in any other similar workbook that might be
created ? Can you store them in some file and then import/export them to
other files ?

Thanks, Tim




All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com