"vba text between two characters" Code Answer's
You're definitely familiar with the best coding language VBA that developers use to develop their projects and they get all their queries like "vba text between two characters" answered properly. Developers are finding an appropriate answer about vba text between two characters related to the VBA coding language. By visiting this online portal developers get answers concerning VBA codes question like vba text between two characters. Enter your desired code related query in the search bar and get every piece of information about VBA code related question on vba text between two characters.
vba text between two characters
' Returns first text between pOpen and pClose (both can't contain "/" character...)
Function ExtractTag(pSource As String, pOpen As String, pClose As String)
Dim startC As Long, endC As Long
startC = InStr(1, pSource, pOpen) + Len(pOpen)
endC = InStr(1, pSource, pClose)
If startC > 0 And Len(pSource) - startC - (Len(pSource) - endC) > 0 Then
ExtractTag = Mid(pSource, startC, _
Len(pSource) - startC - (Len(pSource) - endC))
End If
End Function
' --------------------------------------------------------------------------------------
Sub TestMe()
Debug.Print ExtractTag("Weather is [tag]fine[#tag].", "[tag]", "[#tag]") ' fine
Debug.Print ExtractTag("Value(banana).", "(", ")") ' banana
End Sub
All those coders who are working on the VBA based application and are stuck on vba text between two characters can get a collection of related answers to their query. Programmers need to enter their query on vba text between two characters related to VBA code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about vba text between two characters for the programmers working on VBA code while coding their module. Coders are also allowed to rectify already present answers of vba text between two characters while working on the VBA language code. Developers can add up suggestions if they deem fit any other answer relating to "vba text between two characters". Visit this developer's friendly online web community, CodeProZone, and get your queries like vba text between two characters resolved professionally and stay updated to the latest VBA updates.