VBA Use Mid or Mid to get specific characters from within a string
Const baseString As String = "Foo Bar"
'Get the string starting at character 2 and ending at character 6
Dim midText As String
midText = Mid$(baseString, 2, 5)
'midText = "oo Ba"
Const baseString As String = "Foo Bar"
'Get the string starting at character 2 and ending at character 6
Dim midText As String
midText = Mid$(baseString, 2, 5)
'midText = "oo Ba"
In this page (written and validated by A. Gawali) you learned about VBA Use Mid or Mid to get specific characters from within a string . What's Next? If you are interested in completing VBA tutorial, your next topic will be learning about: VBA Use Trim to get a copy of the string without any leading or trailing spaces.
Share On: |