App.Datevalue function not in VBA

  • Thread starter Office Engineer
  • Start date
O

Office Engineer

Hi
I have tried ;
Application.Worksheetfunction.Datevalue(...)
but it seems Datevalue isn't available (other worksheet functions are).
I suspect this may be a missing reference in the VBA.
Any suggestions?
 
T

Tom Hutchins

The DateValue function exists as a native VBA function. It converts a text
representation of a date into an Excel date (a serial number). For example:

MsgBox DateValue("12/2/2009") - 30

returns 11/2/2009 (the date value of 12/2/2009 minus 30 days).

Hope this helps,

Hutch
 
Top