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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1=A, 2=B, 3=C, 26=Z How do I do this?????? 2

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
GB
Hi,

I'll be returned a number which will be 1 - 26.. How can I replace the number with a letter of the Alphabet??

ie if intNumber = 1 Then
strLetter = A
elseif
.......
end if

There must be a better way than this to do it????

Thnx,
Jonathan
 
Hi Jonathan!

Try using the Char function:

strLetter = Char(intNumber + TheDifference)

I just realized that I can't remember the ASCII values for A-Z, but I imagine you can find them pretty easily.

hth Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top