thanks to all of you.
Indeed I placed the function code into class module ThisWorkbook.
Once I inserted Module1 and placed it there everything works fine.
Thanks again for your help and patience.
/mark
Mark Dvorkin wrote:
I wrote a simple function using VBA Editor.
Function prevDay(Ref)
Application.Volatile
prevDay = Sheets(Application.Caller.Parent.Index -
1).Range(Ref.Address)
End Function
When I call it Excel gives me #NAME? error.
Do I need to register it somehow?
sorry for a bloody beginner question
and thanks in advance for any help.
/mark
|