Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy excel sheet
I am trying to copy an excel sheet from one workbook to another with the following code. The problem is that it doesn't do anything. Do you have any suggestions here? Thanks a ton!
Copy      Help
ExcelSheet es1 es2

es1.Init("Yields" 4 "$desktop$\SFR.xlsm")
es2.Init("Summary" 4 "$desktop$\BTAv13.xlsm")
Excel.Workbook wb2=xlApp.ActiveWorkbook wb2.sheets.Item(wb2.Sheets.Count))
I tested this code, works.
Silly me. I was not saving the spreadsheet at the end. That is why when I opened the destination spreadsheet, it did not have the sheet. Thank you Gintaras!

Forum Jump:

Users browsing this thread: 1 Guest(s)