Error 1004: Application Defined or object defined error
i am trying to create a simple code (before i make it more complicated) but i
fall on the first hurdle.
what is wrong with this?
Public Function returndate(inidate As Date) As Date
Dim calcdate As Double
calcdate = CDbl(inidate + 5)
On Error GoTo Errfunction
Application.Worksheets("Dates Lookup").Range("D6").Value = calcdate
Errfunction:
MsgBox Err.Description
MsgBox Err.Number
End Function
|