The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Hi, who can help me?
i have a function for convert a numeric value to abc value in tow arrays but not work correctly
example: for "NumberToABC("60")"
in correct form must have "O" but his function return "F"
Instead of returning the letter "O" letter "F" on returns.
Can anyone help me?
i have a function for convert a numeric value to abc value in tow arrays but not work correctly
Code:
function NumberToABC(pString)
fString = trim(pString)
if fString = "" or IsNull(fstring) then
exit function
else
txtABCWords = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z" ' 26
txtEquivalentReplace = "1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100,200,300,400,500,600,700,800" ' 26
aWords = split(txtABCWords, ",")
eReplace = split(txtEquivalentReplace, ",")
for i = 0 to ubound(eReplace)
fString = Replace(fString, eReplace(i), aWords(i), 1, -1, 1)
next
end if
NumberToABC = fString
end function
example: for "NumberToABC("60")"
in correct form must have "O" but his function return "F"
Instead of returning the letter "O" letter "F" on returns.
Can anyone help me?