Public Variables
Ps. You don't need the parens near the now() in your code. That's required in
a formula in a cell in excel.
This will work fine:
strYear = format(WorksheetFunction.WorkDay(Now, -1), "yyyy")
as will:
strYear = format(WorksheetFunction.WorkDay(Date, -1), "yyyy")
<<snipped
|