View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dzuy dzuy is offline
external usenet poster
 
Posts: 9
Default VBA: Date Comparison

Thank you! I have implemented it and it works.

"Ingolf" wrote:

Hi,

'declare variables
Dim dat As Date
Dim days As Integer
'enter date as text, change to date format and save in variable dat
dat = CDate(InputBox("Enter Date (mm/dd/yy)"))
'subtract entered date from systemdate and save result in variable days
days = Date - dat

Regards
Ingolf