Link to home
Start Free TrialLog in
Avatar of Seven price
Seven priceFlag for United States of America

asked on

start at 0

I have a count that starts at 1 and I need it to start at 0.

Dim cnt As Integer = 0

inside a reader (( Do While ))
cnt = cnt + 1
tb.ID = quantity" + cnt.ToString()

how can I get it to start at 0
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

put the cnt = cnt +1 at the end of the tool, or do:

Dim cnt As Integer = -1
ASKER CERTIFIED SOLUTION
Avatar of mandriluy
mandriluy

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
Avatar of mandriluy
mandriluy

in the firstTime if... set firstTime = False;  
Avatar of Seven price

ASKER

this worked

tb.ID = quantity" + cnt.ToString()
cnt = cnt + 1