VBA Substrings
Use Left or Left$ to get the 3 left-most characters in a string
Const baseString As String = "Foo Bar"
Dim leftText As String
leftText = Left$(baseString, 3)
'leftText = "Foo"
Const baseString As String = "Foo Bar"
Dim leftText As String
leftText = Left$(baseString, 3)
'leftText = "Foo"
In this page (written and validated by A. Gawali) you learned about VBA Substrings . What's Next? If you are interested in completing VBA tutorial, your next topic will be learning about: VBA Use Right or Right to get the 3 right most characters in a string.
Share On: |