does anyone know how to tell if a string is in a certain format .eg. ####/#####
thanks
Printable View
does anyone know how to tell if a string is in a certain format .eg. ####/#####
thanks
You can user InStr function.
=======
Dim lngPos As Long
Dim strTheString As String
lngPos = InStr(0, "/", strTheString , vbBinaryCompare)
if lngPos>0 then
MsgBox "Find!"
end if
=====
Regards,
Michi
Check the String Using InStr & Mid Functions to see
Whether there is a "/" in the string
whether there r 4 characters before "/" and then there r 4 characters after "/"
U can use Split & Len also in this case