09-03-2015, 08:23 AM
Greetings,
Below code excerpt is part of a bigger QM program.
I need to copy a range of data from a newly opened Excel workbook(via CRM) to an already opened main report Excel workbook.
Below is what I have done so far without success in the last line.
Nothing pastes.
Could you advise the right route please.
Macro HH1
Thanks,
Philip
Below code excerpt is part of a bigger QM program.
I need to copy a range of data from a newly opened Excel workbook(via CRM) to an already opened main report Excel workbook.
Below is what I have done so far without success in the last line.
Nothing pastes.
Could you advise the right route please.
Macro HH1
;;Activate new HH1 report Excel and find the report sheet.
int w95=act(wait(0 WV win("Microsoft Excel - Sheet1" "XLMAIN")))
es.Init
Excel.Range r=es._Range("A1:AH10000")
;r.Cells.Select
;r.Copy
act w5 ;;Activate main report to which the new excel report has to be copied to.
esReport.Init
esReport.Activate(1 "HH1 Spool") ;;Activate sheet 'HH1 Spool' and clear old data.
Excel.Range r1=esReport._Range("A1:AH10000")
r1.Clear
r1.Range("A1").Select
r1=r.Value ;;Transfer/paste details from one workbook sheet to the other.
Thanks,
Philip
Best Regards,
Philip
Philip