View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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