Experts Exchange connects you with the people and services you need so you can get back to work.
Public Function ContainsDate(ByVal Text As String) As Boolean
Dim Parts As Variant
Dim Item As Integer
Dim Found As Boolean
Parts = Split(Text & " ", " ")
For Item = LBound(Parts) To UBound(Parts)
If IsDate(Parts(Item)) Then
Found = True
ContainsDate = Found
Open in new window
Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.
since there is no way of controlling what clients type in
My program needs to check if there is a date in the filename AND then compare it to the date within the file. Date in the file and date in the name have to be the same, otherwise it goes into an error log file.
1st - there will be no agreed format with the clients, because i know it is possible to write code which will pick out the date from a random string.
I am sending a survey Excel file to client's, which they are completing daily.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Your question, your audience. Choose who sees your identity—and your question—with question security.