Is it possible to increment a Letter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to increment a Letter A to B .....and so on till Z through code. Is there a function to increment it

thanks for your help
 
Avir said:
Is it possible to increment a Letter A to B .....and so on till Z through
code. Is there a function to increment it?
thanks for your help.

How about Chr$(Asc(someLetter) +1) keeping in mind that A to Z = 65 to 90?
 
The following code will assign a starting Character (A)
to a string variable, then increment it to the next
character (B). Keep in mind that this is case sensative,
so what ever character you start with this will produce
the next character. You will need to check for the "Z =
90" and take appropriate action.

Dim strStartVal As String
Dim strNewVal As String
strStartVal = "A"
strNewVal = Chr(Asc(strStartVal) + 1)

HTH

Byron

-----Original Message-----
Is it possible to increment a Letter A to B .....and so
on till Z through code. Is there a function to increment
it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top