Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Queries MLK Excel Worksheet Functions 5 May 31st 08 05:18 PM
Queries in Macros Lilbit Excel Worksheet Functions 1 April 9th 08 07:34 PM
Web Queries Stonewall Excel Discussion (Misc queries) 4 July 23rd 07 03:35 PM
Web Queries Gary Smith Excel Discussion (Misc queries) 0 September 14th 05 07:58 PM
HOW DO I TRANSFER EXCEL SPREADSHEETS WITH QUERIES AND MACROS? Peachtree Help Excel Discussion (Misc queries) 1 March 20th 05 06:45 AM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"