array function on string by character count

Posted on 2004-11-18
Last Modified: 2007-12-19
this one should be easy i cannot find the code to take care of it though
i have the following string


The character count will always be (12) i need the command that will allow me to replace the (9) character with "" nothing


i need the code to array a string by character?
thanks in advance

Question by:DTRON04
    LVL 3

    Accepted Solution

    add left$ up to 8th char to right$ from 10th char

    Author Comment

    thanks for helping me through that brain fart RAP

    here is the code for RAP's sugestion

    Dim strContents as String
    strContents = 045718691031
    strContents = CStr(Microsoft.VisualBasic.Left((strContents), 8) + CStr(Microsoft.VisualBasic.Right(strContents, 3)))


    LVL 28

    Expert Comment

    Dim s As String = "045718691031"

            ' A string can be accessed as an array of characters
            Dim i As Integer
            For i = 0 To s.Length - 1
               if i = 8 then
               end if

    from here you can do whatever you want. Right to another array, replace etc

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now