View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Run Time Error 424

Put the workbook names in quotes. E.g.,

Workbooks("workbook1.xls").Worksheets("Data").Rang e("PasteCell").
Value =
Workbooks("workbook2.xls").Worksheets("Supply").Ra nge("CopyCell")
..Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"ExcelMonkey " wrote
in message ...
I have a macro which runs while a number of workbooks are open.

I keep
getting a Run Time Error 424 when I do the following:


Workbooks(workbook1.xls).Worksheets("Data").Range( "PasteCell").Va
lue =

Workbooks(workbook2.xls).Worksheets("Supply").Rang e("CopyCell").V
alue

I know that both worksheets are open and that the sheet names

are
correct as well as the named ranges. What am I doing wrong?

Thanks


---
Message posted from http://www.ExcelForum.com/