Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copying and Pasting vlaues between 2 workbook sheets.
#1
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
Code:
Copy      Help
;;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
#2
probably
r1.Value=r.Value


Forum Jump:


Users browsing this thread: 2 Guest(s)