Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 69
Default Macros: can you copy macros from one doc to another?

Hello: I have recorded 3 different macros in an Excel document. Problem is, I
already have 4 different other "working" copies of that document out there. I
wanted to enhance the other working copies with the macros so I copied and
pasted the macros into the other documents. Is this ok to do? It seems like
it is performing the macros but it keeps giving me an error message. In
addition, whenever I open a document and check the macros names, it always
lists the same ones. Does that mean that I have to re-name the macros or
recreate the macros in each working copy instead of copying? I am concerned
that it feeds back to the original document. Thank you!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Macros: can you copy macros from one doc to another?

It is ok to copy macros. You just can't reference the specific workbook name
usch as book1.xls because each file has a different name. Use Thisworkbook
to reference the workbook where the macro is located. Or get the name by
using thisworkbook.name.

You also must have the same sheetnames if you are referencing the sheets by
there actual names. If the code is failing you should get the failed line
highlighted and an error message. Posting the error and the highlighted line
will help solve the problem.

"Roady" wrote:

Hello: I have recorded 3 different macros in an Excel document. Problem is, I
already have 4 different other "working" copies of that document out there. I
wanted to enhance the other working copies with the macros so I copied and
pasted the macros into the other documents. Is this ok to do? It seems like
it is performing the macros but it keeps giving me an error message. In
addition, whenever I open a document and check the macros names, it always
lists the same ones. Does that mean that I have to re-name the macros or
recreate the macros in each working copy instead of copying? I am concerned
that it feeds back to the original document. Thank you!

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
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
Macros warning always shows up, even if all macros removed Joe M Excel Discussion (Misc queries) 1 December 20th 07 04:45 AM
Copy using Macros JorgeAE Setting up and Configuration of Excel 1 March 2nd 06 11:52 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM
Copy XL macros from one PC to another JDonahou Excel Discussion (Misc queries) 2 April 23rd 05 12:47 AM


All times are GMT +1. The time now is 07:51 AM.

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"