Variables of type Date must have their values enclosed in # signs : Date Type « Data Type « VBA / Excel / Access / Word






Variables of type Date must have their values enclosed in # signs

 
Sub dateSub()
    Dim thisDate As Date
    thisDate = #10/8/2003#
    Debug.Print thisDate
End Sub

 








Related examples in the same category

1.Create Date type variable
2.Date Constants
3.Date value calculation
4.Try It Out-Dates
5.Times
6.Date and Time Functions