Thread: Run-Time Error
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Run-Time Error

Typo warning:

Sheet2.Cells(2, 1),Value = Sheet1.Cells(2, 1).Value


should be:

Sheet2.Cells(2, 1).Value = Sheet1.Cells(2, 1).Value

(the comma preceding the first instance of Value should be a period)


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi JimFor,

If you intend to use the sheet code names, try:

Sheet2.Cells(2, 1),Value = Sheet1.Cells(2, 1).Value

If you intend to use the sheet names, try:

Worksheets("Sheet2").Cells(2, 1).Value = _
Worksheets("Sheet1").Cells(2, 1).Value