PDA

View Full Version : Copy and Paste between Instances of Excel



eskimo281
02-17-2011, 12:31 PM
Hi,
I am new to programming and wanted some advice.
The problem that I am facing is as follow: I have a simulation software that export to Excel. I am able to automate the export function of the simulation software of the via Excel VBA (call this ExcelA.xls). However, when the software export, it export to a new instance (ExcelB.xls). Thus I cannot do simple programming to activate in ExcelB.xls.

What I want to do is copy the data (from say Sheet1) from this new instance (ExcelB.xls) and paste it into the (say Sheet1) of ExcelA.xls of the old instance.
And finally close the new instance ExcelB.xls without saving.

Does anyone know how to approach this problem?

some examples would be great

Thanks ahead

IBihy
02-21-2011, 12:37 PM
Hello eskimo281,

let me sort it out, hoping I got it right:
You have some VBA code in a workbook (you name it ExcelA) that exports data from a simulation software. However, the data does not touch down in your workbook ExcelA, but in another workbook, you call ExcelB.
Two questions arise:
1. Does your VBA-code in ExcelA completely control the export or does it just kick the simulation software's export function?
2. If you are completely in control of the export, it's fairly easy. If not, is there a way to tell the export function in the other software which workbook to use?
Please try to answer the questions and attach the ExcelA.
Thanks.

Isabella

tilamok
02-21-2011, 01:38 PM
Can you export as a csv file to a particular folder?

Then you can write code to import fro the csv file