I'm sure this little routine has been posted here before but I couldn't find any. Maybe someone will find it of use.

#Compile Exe  
#Include "WIN32API.INC"
Sub Phone_Letters_to_Numbers(P$) 
  Local ctr&, x$
  p$ = UCase$(p$)'JIC any lower case
  For ctr =1 To Len(p$)'check whole length
     x$ = Mid$(p$, ctr, 1)'check each character
     Select Case x$ 'Is it a letter?
       Case "A", "B", "C"
         x$ = "2"
       Case "D", "E", "F"
         x$ = "3"
       Case "G", "H", "I"
         x$ = "4"
       Case "J", "K", "L"
         x$ = "5"
       Case "M", "N", "O"
         x$ = "6"
       Case "P", "Q", "R", "S"
         x$ = "7"
       Case "T", "U", "V"
         x$ = "8"
       Case "W", "X", "Y", "Z"
         x$ = "9"
     End Select 
     Mid$(p$, ctr, 1) = x$'Now put character back
  Next ctr
End Sub
Function PBMain
 Local p$, Phone$                   
 Phone$ = "1-800-Call Me Now"          
 p$ = Phone$ 'hold it to check later
 Call Phone_Letters_to_Numbers(Phone$) 
 ? p$ & $CrLf & Phone$
End Function
Charm is a glow within a woman
that casts a most becoming light on others.
John Mason Brown