remove all text EXCEPT whats between [ ]

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am need assistance with this. I have a textbox that contains drive
information between ["G:\\server\share\"] I only care about whats between [].
How can I parse only this info from string?


Thanks,
Jack
 
Public Function StripSquareBrackets(ByVal StringIn As String) As String
StripSquareBrackets = Replace(Replace(StringIn, "[", ""), "]", "")
End Function
 
I am need assistance with this. I have a textbox that contains drive
information between ["G:\\server\share\"] I only care about whats between [].
How can I parse only this info from string?


Thanks,
Jack

Mid([textboxname], InStr([textboxname], "[") + 1, InStr([textboxname],
"]") - InStr([textboxname], "[") + 1)

John W. Vinson[MVP]
 
Back
Top