View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default this should work..

The source workbook needs to be open. Moreover, when you reference
another (open) workbook, you use only the file name (e.g. "ABC.xls")
not the complete path to the workbook (e.g., "C:\Test\ABC.xls").

aWS.Range("A18").Value = _
Workbooks("ABC.xls").Sheets("Sheet1").Range("D40") .Value

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Sat, 13 Dec 2008 04:50:05 -0800, pls123
wrote:

But it doesn't make the copy !!..
what's the problem??

----------------------------------------------
Dim aWB As Workbook
Dim aWS As Worksheet

Set aWB = ThisWorkbook
Set aWS = aWB.Worksheets("Sheet1")

aWS.Range("A18").Value =
("She et1").Cells("D40").Value