|
-
Jul 27th, 2000, 03:50 AM
#1
Thread Starter
Randalf the Red
Well ....
Better still, use the VB IsDate() function. Include your string in this function, which will return True if the string is a valid date and False if not.
Private Sub ..........
Dim MyDateString As String
....Get the date string ....
If IsDate(MyDateString) Then
MsgBox "Gosh! It's a date!"
Else
MsgBox "Sorry, fella, you got it wrong"
Endif
End Sub
This way you don't have to generate and then trap an error.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|