I am trying to copy a cell address when I copy it to a new worksheet.
When I copy usually, all I get is the value of the cell.
I tried to use Paste Special, highlighted in red, but it didn't work.
I get a runtime error 1004
Application defined error.
Could I please get some help figuring out the syntax here?
When I copy usually, all I get is the value of the cell.
I tried to use Paste Special, highlighted in red, but it didn't work.
Code:
Option Explicit
Sub FindProjectName()
Dim LaR As Long
Dim NP As Long
Dim MasterTemplate As Range
Dim MR As Long
MR = Worksheets("Database").Range("MasterTemplate").Rows.Count
LR = Sheets("Projects").Cells(Rows.Count, "B").End(xlUp).Row
NP = Sheets("Database").Cells(Rows.Count, "C").End(xlUp).Row
Sheets("Projects").Cells(LastRow, "B").Copy
Sheets("Database").Cells(Newproject - Masterrow + 1, "C")[B][COLOR=#ff0000].PasteSpecial Link:=True[/COLOR][/B]
End Sub
I get a runtime error 1004
Application defined error.
Could I please get some help figuring out the syntax here?