CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: format

  1. #1
    Join Date
    Sep 2000
    Posts
    58

    format

    does anyone know how to tell if a string is in a certain format .eg. ####/#####

    thanks



  2. #2
    Join Date
    May 2001
    Location
    Canada
    Posts
    182

    Re: format

    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

  3. #3
    Join Date
    Jun 2001
    Location
    Sri Lanka
    Posts
    272

    Re: format

    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


    If u don't know how to Rate an answer, then Rate my answer to learn, If u know, then practice it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured