Mega Code Archive

 
Categories / VisualBasic Script / Data Type Functions
 

Using the Asc Function to Return a Character Code

'Use the Asc function to return the character code for the first character of the current selection 'Using the Val Function to Extract a Number from the Start of a String Sub valDemo()     Dim Address1 As String     Address1 = "asdf 123"     Dim StreetNumber As Integer     StreetNumber = Val(Address1)          Debug.Print StreetNumber End Sub