minutes & seconds functions
Use the IsDate function
However, you'll note that ":45" is not considered a valid date.
Sub test()
Debug.Print IsDate("1:22")
Debug.Print IsDate("0:22")
Debug.Print IsDate(":45")
Debug.Print IsDate("6a:20")
Debug.Print IsDate("hello")
End Sub
Cheers,
Rob
On 13-Dec-2009 14:39, Robert Crandal wrote:
Does VBA have any built in functions that test if a
string is properly formatted in minutes and seconds
notation such as: mm:ss???
For example, if the function is given a string value
of "1:22" or "0:22" or ":45", then the function should
return TRUE! However, the function would return
false if it was given strings such as: "6a:20" or "hello" etc...
thnx
|