Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA code shared between .XLS files
I have lots of worksheet files that use the same VBA code. Currently I copy
the code from one file to the next. However, if there is an error in the VBA code, I have to go to ALL the files and update it, which is a royal pain. Combining all the files into a single file is not practical. How can I have a single copy of the VBA code that is used by all the files? -- John |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA code shared between .XLS files
Create a worksheet with the macros you want.
Choose Window, Hide and then save it to C:\Program Files\Microsoft Office\Office\Xlstart (assuming you used the default location when you installed Office). To add/modify macros in personal.xls, choose Window, Unhide to unhide personal.xls. After you finish storing your macros, choose Window, Hide to hide personal.xls again. "BitTwiddler" wrote: I have lots of worksheet files that use the same VBA code. Currently I copy the code from one file to the next. However, if there is an error in the VBA code, I have to go to ALL the files and update it, which is a royal pain. Combining all the files into a single file is not practical. How can I have a single copy of the VBA code that is used by all the files? -- John |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
VBA code shared between .XLS files
Write an XLA add-in. Then when code needs updating, you just update the one XLA file. See http://www.cpearson.com/Excel/CreateAddIn.aspx for the basics for writing an XLA. They're quite simple. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Fri, 20 Mar 2009 07:51:00 -0700, BitTwiddler wrote: I have lots of worksheet files that use the same VBA code. Currently I copy the code from one file to the next. However, if there is an error in the VBA code, I have to go to ALL the files and update it, which is a royal pain. Combining all the files into a single file is not practical. How can I have a single copy of the VBA code that is used by all the files? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Shared Files in Excel | Excel Discussion (Misc queries) | |||
PC name vs User name for shared files? | Excel Discussion (Misc queries) | |||
sort in shared files | Excel Discussion (Misc queries) | |||
Shared files - read only on the fly | Excel Discussion (Misc queries) | |||
Shared files | Excel Worksheet Functions |