Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy data from workbook to another workbook

Status
Not open for further replies.

choppysuey

Technical User
Mar 28, 2001
54
US
hi all,

I was interested in knowing if any has an example of code of how to copy data from one excel workbook which contains multiple worksheets into a worksheet of another workbook.
(i.e. a worksheet named plant in myfile.xls to a worksheet named destination in otherfile.xls.)

I used the following code to open excel:

oExcel=CreateObject('Excel.Application')
oExcel.visible = .t.
oExcel.Workbooks.Open('C:\myfile.xls')

Now do i need to create another excel object to open otherfile.xls and then do the copy commands?

Thx in advance.

-suey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top