Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear All,
I am writing in VBA for Excel 2003 a function to validate Date values which are inputted via a set of combo boxes, one each for day, month and date. I am currently puzzling how to go about convering the string "DD\MM\YYYY" into a true date value to check if it is a real date. The code is given below - I'm sure I'm missing something simple.... Thanks for any assistance. Regards Function Parse_Date(Day As String, Month As String, Year As String, Source As String) As Boolean Dim FullDate As String FullDate = Day & "/" & Month & "/" & Year Dim DateFormatted As Date DateFormatted = Format(FullDate, "longdate") Do While (IsDate(DateFormatted) < True) MsgBox (FullDate & " entered in " & Source & " is not a real date.") Loop Parse_Date = True End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting a string into a number format | Excel Discussion (Misc queries) | |||
Converting a time format to a String format in Excel | Excel Discussion (Misc queries) | |||
Converting a Date to a string | Excel Programming | |||
Converting a Date to a string | Excel Programming | |||
Converting a string date into a Excel Date | Excel Programming |