Function AlphaSpell(TextIn)
'Alpha Spell converts a string into the international 'alphabet It ignores and removes anything that isnot a 'letter of the alphabet/number TextOut = "" TextIn = UCase(TextIn) For X = 1 To Len(TextIn) ConvertChar = Mid(TextIn, X, 1) Select Case ConvertChar Case "A" TextOut = TextOut & "alpha " Case "B" TextOut = TextOut & "bravo " Case "C" TextOut = TextOut & "charlie " Case "D" TextOut = TextOut & "delta " Case "E" TextOut = TextOut & "echo " Case "F" TextOut = TextOut & "foxtrot " Case "G" TextOut = TextOut & "golf " Case "H" TextOut = TextOut & "hotel " Case "I" TextOut = TextOut & "india " Case "J" TextOut = TextOut & "juliet " Case "K" TextOut = TextOut & "kilo " Case "L" TextOut = TextOut & "lima " Case "M" TextOut = TextOut & "mike " Case "N" TextOut = TextOut & "november " Case "O" TextOut = TextOut & "oscar " Case "P" TextOut = TextOut & "papa " Case "Q" TextOut = TextOut & "quebec " Case "R" TextOut = TextOut & "romeo " Case "S" TextOut = TextOut & "sierra " Case "T" TextOut = TextOut & "tango " Case "U" TextOut = TextOut & "uniform " Case "V" TextOut = TextOut & "victor " Case "W" TextOut = TextOut & "whiskey " Case "X" TextOut = TextOut & "x-ray " Case "Y" TextOut = TextOut & "yankee " Case "Z" TextOut = TextOut & "zulu " Case "1" TextOut = TextOut & "one " Case "2" TextOut = TextOut & "two " Case "3" TextOut = TextOut & "three " Case "4" TextOut = TextOut & "four " Case "5" TextOut = TextOut & "five " Case "6" TextOut = TextOut & "six " Case "7" TextOut = TextOut & "seven " Case "8" TextOut = TextOut & "eight " Case "9" TextOut = TextOut & "nine " Case "0" TextOut = TextOut & "zero " End Select Next X AlphaSpell = UCase(TextOut) End Function Inputs:All it needs is TextIn (a string) Returns:It returns a string (capitalised) Assumes:You need to know how to use a function. |