Run Time Error 424

  • Thread starter Thread starter ExcelMonkey
  • Start date Start date
E

ExcelMonkey

I have a macro which runs while a number of workbooks are open. I kee
getting a Run Time Error 424 when I do the following:

Workbooks(workbook1.xls).Worksheets("Data").Range("PasteCell").Value
Workbooks(workbook2.xls).Worksheets("Supply").Range("CopyCell").Value

I know that both worksheets are open and that the sheet names ar
correct as well as the named ranges. What am I doing wrong?

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

Workbooks("workbook1.xls").Worksheets("Data").Range("PasteCell").
Value =
Workbooks("workbook2.xls").Worksheets("Supply").Range("CopyCell")
..Value


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

ExcelMonkey > said:
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 =
 
Back
Top