View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ray Costanzo [MVP] Ray Costanzo [MVP] is offline
external usenet poster
 
Posts: 22
Default copying from another instance of excel

Do you get an error? What does it say?

My guess is that your problem is with (Sheet1). When using
Workbook.Worksheets, the argument expected is either the numeric
index of the worksheet or the name property of the sheet - which is a
string. So, try using ("Sheet1") instead (Sheet1).

Ray at work


"Paul" wrote in message
...
Is it possible to copy cell contents between instances of
excel??

I cannot get the following code to work. Can anyone tell
me why?

Application.Workbooks("book2.xls").Worksheets(Shee t1).Range
("a1").Value = Application.Workbooks
("book1.xls").Worksheets(Sheet1).Range("a1").Va lue