title: Converting string to ASCII number
body: <p>I am trying to write a function using Excel VBA to convert a string to its respective ASCII number. For example:</p>
  
  <pre><code>"ABCD" =&gt; "65666768"
  </code></pre>
  
  <p>I have written this code but it's failed to do the conversion:</p>
  
  <pre><code>Public Function asciien(s As String) As String
  ' Returns the string to its respective ascii numbers
     Dim i As Integer
  
     For i = 1 To Len(s)
        asciien = asciien &amp; CStr(Asc(Mid(s, x, 1)))
     Next i 
  
  End Function
  </code></pre>