R
Richard
Hi
Instead of restating the following in each module or procedure I would like
to set a public variable to do the following:
Dim strYear As String
strYear = WorksheetFunction.WorkDay(Now(), -1)
strYear = Format(strYear, "yyyy")
I understand that in a seperate module I can simply state:
public strYear As String
but do not understand how to state that strYear is equal to
WorksheetFunction.WorkDay(Now(), -1) and to format it correctly.
Can you please advise.
Thanks in advance
Richard
Instead of restating the following in each module or procedure I would like
to set a public variable to do the following:
Dim strYear As String
strYear = WorksheetFunction.WorkDay(Now(), -1)
strYear = Format(strYear, "yyyy")
I understand that in a seperate module I can simply state:
public strYear As String
but do not understand how to state that strYear is equal to
WorksheetFunction.WorkDay(Now(), -1) and to format it correctly.
Can you please advise.
Thanks in advance
Richard