Macro to copy and paste between two workbooks

P

Paula

I have a macro that copies specific cells between workbooks, but I have
several workbooks I'd like to use it with (different company information) and
each is named differently. Because the macro switches back and forth copying
and pasting it names the Specific Workbook to copy from or paste to. Can I
make it generic somehow so I can use the macro with any workbook without
having to rename my workbooks and rename them again when the macro has
finished running.
 
F

filo666

use the ActiveWorkbook.Next application and erase all the workbook names in
your code (ex. workbook( "aaaaaaaa.xls")), when you run the macro start from
the workbook you want to copy from an the macro will automatically switch to
the next opened workbook and paste all what hes has previusly copied.
HTH
PD. Remember just to have tow workbooks opened
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top