ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy and Paste - Workbook to Workbook (https://www.excelbanter.com/excel-programming/418310-copy-paste-workbook-workbook.html)

Dwight

Copy and Paste - Workbook to Workbook
 
I am looking for a way to copy a row of information from one workbook to
another.

A user sends their Workbook to us (Workbook 2). We open it and copy his/her
information in row 2 to the Master.xls

Workbook 1 file name is Master.xls
Workbook 2 file name changes

Need to copy row 2 from Workbook 2 to the next available row in Workbook 1
then save and close Workbook 1.

Thanks in advance!

Dwight





Ron de Bruin

Copy and Paste - Workbook to Workbook
 
Hi Dwight

Start here
http://www.rondebruin.nl/copy1.htm

The last example on the page will use a different workbook


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dwight" wrote in message ...
I am looking for a way to copy a row of information from one workbook to
another.

A user sends their Workbook to us (Workbook 2). We open it and copy his/her
information in row 2 to the Master.xls

Workbook 1 file name is Master.xls
Workbook 2 file name changes

Need to copy row 2 from Workbook 2 to the next available row in Workbook 1
then save and close Workbook 1.

Thanks in advance!

Dwight





Dwight

Copy and Paste - Workbook to Workbook
 
Ron,
Thank you!
How do save file name for Workbook 2 to a variable?

Dwight

"Ron de Bruin" wrote:

Hi Dwight

Start here
http://www.rondebruin.nl/copy1.htm

The last example on the page will use a different workbook


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dwight" wrote in message ...
I am looking for a way to copy a row of information from one workbook to
another.

A user sends their Workbook to us (Workbook 2). We open it and copy his/her
information in row 2 to the Master.xls

Workbook 1 file name is Master.xls
Workbook 2 file name changes

Need to copy row 2 from Workbook 2 to the next available row in Workbook 1
then save and close Workbook 1.

Thanks in advance!

Dwight






Ron de Bruin

Copy and Paste - Workbook to Workbook
 
If you copy the code in your personal.xls you can run the code
for the workbook that is active (No need to know the name)

You must change this line

Set SourceRange = ThisWorkbook.Sheets("Sheet1").Range("A1:K1")

To this for the range on the activesheet

Set SourceRange = Range("A1:K1")

See this page how you can copy the code in your personal file so
you can use the macro for any activeworkbook.
http://www.rondebruin.nl/personal.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dwight" wrote in message ...
Ron,
Thank you!
How do save file name for Workbook 2 to a variable?

Dwight

"Ron de Bruin" wrote:

Hi Dwight

Start here
http://www.rondebruin.nl/copy1.htm

The last example on the page will use a different workbook


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dwight" wrote in message ...
I am looking for a way to copy a row of information from one workbook to
another.

A user sends their Workbook to us (Workbook 2). We open it and copy his/her
information in row 2 to the Master.xls

Workbook 1 file name is Master.xls
Workbook 2 file name changes

Need to copy row 2 from Workbook 2 to the next available row in Workbook 1
then save and close Workbook 1.

Thanks in advance!

Dwight







All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com