Extract several variables from textbox content
Sub test()
'string for testing
textstring = "azf[123]asdfasdf"
'line below is what should be in the final code
'textstring = userform1.TextBox.Text
bracketpos = InStr(textstring, "[")
If bracketpos 0 Then
textstring = Mid(textstring, bracketpos + 1)
bracketpos = InStr(textstring, "]")
If bracketpos 0 Then
textstring = Left(textstring, bracketpos - 1)
End If
End If
End Sub
"LuisE" wrote:
I have a textbox in an user form. The user is to type a paragraph in the
textbox.
I need to extract from that text any letter between brackets as a variable
in order to later refer to the column
i.e whe it finds a [A] it'll refer to cells (A,1)
Thanks
|