Copying data from one workbook to another

lordriel

Board Regular
Joined
Nov 1, 2005
Messages
61
I'm having a problem with what, I hope, is a situation that has an obvious answer that I'm simply overlooking.

Here are the basic details of what I'm doing:

1. Periodically a report is ran and sent via email attachment in xls format that is saved to the user's computer
2. Via userform, the user opens up the attachment
3. Key data from the workbook is copied over into another workbook, sorted and used to populate several fields in a formatted coversheet
4. Multiple activities take place after this

The problem is...I can work within a single workbook without any serious issue. However, bringing data from one workbook to another has given me issue.

Coding the process for populating the coversheet infomation is also no issue...if I have the data in place.

Any help would be greatly appreciated!

lr
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

ravishankar

Well-known Member
Joined
Feb 23, 2006
Messages
3,566
I give you a generalized reply. you should modify to suit your conditions.

insert the following code in a macro (press Alt F8)

cells(1,1) = workbooks("abc.xls").worksheets("sheet3").cells(1,1)

this will copy contents of cells(1,1) from sheet 3 of workbook abc.xls into your current workbook

ravi
 

Watch MrExcel Video

Forum statistics

Threads
1,113,990
Messages
5,545,370
Members
410,679
Latest member
rolandbianco
Top