Results 1 to 4 of 4

Thread: remove the first 6 letters from a string

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Posts
    87

    remove the first 6 letters from a string

    hi, does anyone know how to remove the first 6 characters from a string?

  2. #2
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152
    VB Code:
    1. dim yourstring as string
    2. yourstring = Right$(yourstring, Len(yourstring) - 6)
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  3. #3
    Hyperactive Member
    Join Date
    May 2003
    Posts
    401
    or you could use:

    Dim strMyString As String
    Dim strSource as String
    strSource = "Hello!!!! This is an Example of Strings"
    strMyString = Mid(strSource, 7, Len(strSource))
    MsgBox strMyString
    Enjoy!!!
    apps_tech

  4. #4
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    468
    Code:
    strMyString = Mid(strSource, 7, Len(strSource))
    might be better expressed as
    Code:
    strMyString = Mid$(strSource, 7)

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