Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referring to a Named Range

Status
Not open for further replies.

jsnull

IS-IT--Management
Feb 19, 2002
99
US
Hi ... I have two spreadsheets...

test1.xls
test2.xls

test2.xls has a range of cells named Bld1

I want to be able to copy this range from test2.xls into test1.xls using VBA coding.

Please advise as to way to accomplish this?

Jim Null
[afro]
 
VBA Code in test2.xls:
Code:
Range("Bld1").Copy Workbooks("test1.xls).Range("A1")
where Range("A1") can be changed to wherever you need.


Regards,
Mike
 
Try
Code:
Workbooks("test2.xls").Copy Range("A1")

Of course, in either example, both workbooks must be open.


Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top