Switching Workbooks in vbscript

J

Joe

Hello all and thanks for any help that you can provide. I am trying to
switch between two open workbooks in excel using vbscript. I am able to
open one workbook and create another just fine, but the act of switching
workbooks to copy data from one to the other is kinda stumping me. I just
know it is something fairly simple, but I cannot seem to remember the
command. I tried:

objxl.Workbooks("Book1").Select

but received an error. Any help at all on this would be greatly
appreciated.

Thanks,

Joe
 
K

Kate

Hi,

Try this:

Selection.Copy
Windows("main.xls").Activate
Sheets("Sheet1").Range("A1").Select
Selection.Paste

Kate
 
Top