I have two workbooks

  • Thread starter Thread starter anh82tb via OfficeKB.com
  • Start date Start date
A

anh82tb via OfficeKB.com

I have two workbooks, for instance book1 (currently active) and book2, I
want press combination of Ctrl, Shift and C when book1 is active to open
book2, after that select some data from book2 and press combination of Ctrl,
Shift and t to transfer data selected from book2 to book1. Please tell me the
way using VBA to make the task. I already conducted but failed
 
Ok, you are in 'book1', first open 'book2':

workbooks.open("[path]\Book2.xls")

Now activate Book2

windows("Book2.xls").activate

'select the data you want to copy

windows("Book1.xls").activate

'now put the data into book1

workbooks.close("Book2.xls")
 
Back
Top