|
Department of Technology |
TECH 394 - Tech Computer Applications |
|
Summer 2004 |
|
Add-Ins As a favor to all my co-workers who need to convert from Degrees-Minutes-Seconds to Decimal Degrees and back, within an Excel spreadsheet, I've created a workbook called DD2DMS.xls. It contains a module with 2 functions - DD2DMS and DMS2DD - which make the conversions. I'd like to make these available to a number of people, but I'm not sure how to do it. I can give them the file, but if they want to use my function, they need to have both my workbook and their current file open. I'd prefer a better method... Actually, there are a number of ways to share macros and functions. This discussion will cover 3 - the XLSTART directory, your personal macro workbook, and Add-ins. The picture below shows the structure of a typical hard drive - Excel and the other Office products are stored in folders beneath the Program Files folder. When Excel starts, it looks for a sub-folder called Xlstart. If it finds it, any workbooks in that directory are automatically opened as Excel opens. Some of those files may be hidden, but the macro's and functions attached will still be available in other open workbooks. I could copy my file into my boss's Xlstart folder, but every time he started Excel, he'd see that file load and might wonder what's going on. As you record macro's, one option is to store the macro in your Personal Macro Workbook. Until you save a macro there, this file doesn't exist. Record a macro, and a new file appears in the Xlstart folder - Personal.XLS. This file is hidden, and no worksheets are visible. From then on, as you start Excel, this file loads and you have access to the macro's within it. You must use the Window-Unhide menu item to unhide the file in order to edit it, but you could add any macro's you create to the existing items in this file. In my example, I might copy my two functions into my boss's Personal.XLS file to make them available to him. The best alternative is to create an Add-in. This is really just a worksheet file with several special features:
To create an Add-in:
Having created the Add-in, you need to place it on your user's machine, and link their copy of Excel to it.
|