user1763769
user1763769

Reputation: 103

getting compile error : Sub or Function not defined in vba when trying to use Today() function

I am getting compile error : Sub or Function not defined in vba when trying to use Today() function at below line :

 Worksheets("Dashboard").Range("S" & row).Formula = WorksheetFunction.Days(Worksheets("Dashboard").Range("Q" & row), TODAY())

Upvotes: 0

Views: 876

Answers (1)

Variatus
Variatus

Reputation: 14383

Use Date in place of TODAY() if you are comparing dates.

Upvotes: 1

Related Questions