Increment

Thedon123

Registered User.
Local time
Today, 07:30
Joined
Sep 11, 2002
Messages
98
This is probably a silly question.

Does anybody know how i would increment the alphabet.

so from a to b etc
 
Alphanumeric characters are represented by a numeric ASCII code so, yes, it is possible to 'increment characters.' Without knowing the context of what you are trying to do, I can only give you few pointers.

If 'Text1' is a string variable holding, say, the letter "A" then the following piece of code will turn it to "B":

Text1 = Chr(Asc(Text1) + 1)

You can repeat the code as many times as you want to move through the alphabet. Obviously if you reach "Z" you may want to wrap back round again ...

Hope that helps.

Andy
 

Users who are viewing this thread

Back
Top Bottom