VBA/Excel/Access/Word/String Functions/Left
Left() - A portion of a string beginning from the left side
<source lang="vb">
Sub InstrLeft()
Dim userName As String Dim firstName As String Dim spaceLoc As Integer userName = "First Last" spaceLoc = InStr(1, userName, " ") firstName = Left(userName, spaceLoc - 1) Debug.Print firstName
End Sub
</source>
Left() Returns a substring from the left side of a string.
<source lang="vb">
Sub strDemo5()
Debug.Print Left("Test", 2)
End Sub
</source>