How do I access the individual characters of a string in VB6

Viewed 7131

Consider the following VB code:

    Dim fooBar As String
    fooBar = "Foo Bar"

    Dim q As String
    q = fooBar(0)

In VB.Net, this compiles and my q string variable is set to the letter "F", however in VB6 I get a compile error, as the compiler expects an array.

I am in a scenario in VB6 where it would be really useful to be able to treat a string this way, as in access the individual characters via an indexer or something similar.

How do I access the individual characters of a string in VB6?

Thankyou

1 Answers
Related