Thread: InputBox a date
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default InputBox a date

I was able to do it by placing the value of the variable in a cell, then
setting the variable equal to the contents of that cell. In my particular
scenario that worked OK since I would be putting the variable into that cell
anyway.
But my question still stands. What is the best way to get a date from
an InputBox, either function or method. Thanks. Otto
"Otto Moehrbach" wrote in message
...
Excel 2002, WinXP
I want the user to respond to an InputBox with a date, like 1/1/05.
However, subsequent checks of this date against another date fail because
the Input date is a string.
I know that I can force the Input 1/1/05 into a date with the
DateSerial function. Is there a quicker, better way? The variable that
gets the Input date is declared a Variant.
Thanks for your help. Otto