in reply to Excel OLE Copy and Insert
Hi, damianpadden
If you have Excel installed the easiest way to learn the VBA syntax is to actually record a macro (Tools/Macros/) in Excel and then read the code (Alt+F11)...
I'm assuming that your problem is, in fact, copying the data from Book1.xls/Sheet1!$D:$I into Book2.xls/Sheet1!$D or simply from one sheet to another... the VB would look like this:
Columns("D:I").Select Selection.Copy Sheets("Sheet2").Select Range("D1").Select ActiveSheet.Paste
With the exception of ActiveSheet.Paste this should be easily converted to Win32::OLE syntax.
#With simplifications... #Assume you already have a $ExcelAp, $Book and $Sheet1 & 2 object/vari +able set up $Sheet1->Columns("D:I")->Copy(); $Sheet2->Range("D1")->Select(); $Sheet2->Paste();
HTH - Mark
|
|---|