Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Queries and Macros
I have someone who has queries and macros on a spreadsheet
and they would like to get those on someone else's computer for that person to use as well. How do you transfer those to another computer to use in another spreadsheet? If more information is needed please let me know. I don't explain things the best sometimes. Thanks in Advance, Trisha |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Queries and Macros
Trisha, wrote, in part:
How do you transfer those [macros] to another computer to use in another spreadsheet? The easiest way might be to copy the workbook there and use it as a template for other workbooks. If the macros are independent of the specific content of the workbook, sheet names, named ranges, folder names and the like (possible), the existing content could be deleted and new content entered. Perhaps the same workbook or worksheet structure is useful but another person wants to use the macros for similar tasks in a similar environment. How well this works and which macros continue to work depends critically on how dependent the macros are on existing content, sheet names, workbook names, even cell values. Some macros may continue to work. Others may not. Alternatively, you can copy macros from workbook to workbook. The dependence issue is still relevant. You might have to make certain things so for some macros to work. To transfer macros, open the macro workbook and a new workbook in Excel. From Excel, press Alt+F11, then Ctrl+R. This will put you in the Project Explorer in the VB Editor. Notice in the Project Explorer that there are projects (represented like folders) and modules (like files). There are Sheet modules, the ThisWorkbook module, and perhaps other standard modules, class modules and form modules. You can drag non-Sheet and non-ThisWorkbook modules from the macro workbook project to the new workbook project like you'd drag files to copy them from folder to folder in Windows Explorer. To copy the code from Sheet or ThisWorkbook modules, you will have to double-click on them to open them, select all text, copy it and paste it into a corresponding object module in the new workbook. Macro code might all be in standard, class and form modules and none in Sheet or ThisWorkbook modules, or vice versa or some combination. You do not necessarily have to copy everything, but the success of not doing so depends on knowing what is independent and what is not. Note: If you copy a worksheet from one workbook to another, any code in its Sheet module goes with it, so if there is a lot of code in Sheet modules, consider copying worksheets from workbook to workbook. If the current macros were "installed" by some installation program, just install them for the new user. Did I mention the PERSONAL.XLS hidden workbook? Some could be stored there. They or it can be copied like any other workbook. See more about this in Help if it pertains. Good luck -- Bob Kilmer "Trisha" wrote in message ... I have someone who has queries and macros on a spreadsheet and they would like to get those on someone else's computer for that person to use as well. How do you transfer those to another computer to use in another spreadsheet? If more information is needed please let me know. I don't explain things the best sometimes. Thanks in Advance, Trisha |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with Queries | Excel Worksheet Functions | |||
Queries in Macros | Excel Worksheet Functions | |||
Web Queries | Excel Discussion (Misc queries) | |||
Web Queries | Excel Discussion (Misc queries) | |||
HOW DO I TRANSFER EXCEL SPREADSHEETS WITH QUERIES AND MACROS? | Excel Discussion (Misc queries) |