Link to home
Start Free TrialLog in
Avatar of mikeydk
mikeydkFlag for Denmark

asked on

Substring (VB.NET)

Hey

I would like to get:

A
Ab
Abc
Abcd
...

When using the code i get: Conversion from string "A" to type 'Integer' is not valid.

Why and what to do?

Mike
sString = "Abcdefghijklmno"
        i = 1
 
        Do While i <> 10
 
            j = sString.Substring(0, i)
            MsgBox(j)
 
            i = i + 1
 
        Loop

Open in new window

SOLUTION
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial