I am trying to create a link from a cell on one sheet to a cell on the other sheet, but when I run it I get this runtime error:
Application-defined or object-defined error.
Here is the code:
Worksheets(sheetFrom).Cells(fromRow, fromCol).Copy
Worksheets(sheetTo).Cells(toRow, toCol).Select
ActiveSheet.Paste Link:=True
I am checking the to/from values and they are correct.
update seems like its the cell selection that's causing the problem.
update 2 When the from sheet is the same as to sheet, there is no problem. What am I missing?