+ Reply to Thread
Results 1 to 3 of 3

Character Locations in Strings

  1. #1
    Pflugs
    Guest

    Character Locations in Strings

    Is there a way to access individual characters within strings? In C++, you
    can use brackets, but I don't know how to do it in VBA.

    i.e. word = "string" --> to access the 3rd charcter, I would use word[3]
    (or something like that) in C++. For VBA....?

    Thanks.
    Pflugs

  2. #2
    Tim Williams
    Guest

    Re: Character Locations in Strings

    mid("string",3,1)

    --
    Tim Williams
    Palo Alto, CA


    "Pflugs" <[email protected]> wrote in message news:[email protected]...
    > Is there a way to access individual characters within strings? In C++, you
    > can use brackets, but I don't know how to do it in VBA.
    >
    > i.e. word = "string" --> to access the 3rd charcter, I would use word[3]
    > (or something like that) in C++. For VBA....?
    >
    > Thanks.
    > Pflugs




  3. #3
    Pflugs
    Guest

    Re: Character Locations in Strings

    Thanks!

    "Tim Williams" wrote:

    > mid("string",3,1)
    >
    > --
    > Tim Williams
    > Palo Alto, CA
    >
    >
    > "Pflugs" <[email protected]> wrote in message news:[email protected]...
    > > Is there a way to access individual characters within strings? In C++, you
    > > can use brackets, but I don't know how to do it in VBA.
    > >
    > > i.e. word = "string" --> to access the 3rd charcter, I would use word[3]
    > > (or something like that) in C++. For VBA....?
    > >
    > > Thanks.
    > > Pflugs

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1