Need help pasting to open external workbook with vba

C

Curtis Ramsey

I need to copy a range of data in an active worksheet(say workbook
A.xls) to a worksheet in an open workbook in another instance of excel
97 (say workbook B.xls). I can programatically accomplish the copy
part from A. I can even then manually select a cell in the other open
workbook (B) and manualy paste the range, but I have been unable so
far to accomplish the paste in vba. I suspect that I need to make
B.xls the active workbook and then the paste will work. How do I
switch the active workbook to B?

Curtis
 
C

Charles

Curtis,

You can try this.


Workbooks("B.xls").Range("A3").PasteSpecial Paste:=xlPasteAll


HTH

Charles
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top