Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increment through A-Z

Status
Not open for further replies.

Max1mum2

Programmer
Jan 30, 2003
13
US
is it possible to Loop through A-Z rather than 1- 26?

- maximum
 
This is the best I could do.

Private Sub TestLetters()
Dim i As Integer
For i = Asc("A") To Asc("Z")
Debug.Print Chr(i)
Next i
End Sub
Tyrone Lumley
augerinn@gte.net


 
You can do something like this:
Dim i As Integer
For i = Asc("A") To Asc("Z")
Debug.Print i, Chr(i)
Next i

This will print a list of ASCII value, character pairs like :
65 A
66 B
...
90 Z
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top