He transposed the InStr() parameters and his final calc was off just a tad; I added the +1 in the final line of code. Try this but ensure you use the correct tick symbol, in the code below ' is used by in your example you used `. Just make sure you are parsing on the correct character
Code:Dim A As Long, B As Long, C As Long A = InStr(TEXT1.Text, "'") 'get location of first apostrophe 'if not found exit sub... If A = 0 Then LABEL1.Text = "": Exit Sub B = InStr(A + 1, TEXT1.Text, "'") 'search for 2nd apostrophe C = B - A - 1 'get lengh of string between them LABEL1.Text = Mid(TEXT1.Text, A + 1, C) 'should return a string starting at postition a length c




Reply With Quote