If the text box is called text1 you can use the following:
If Text1.Text <> "" Then
If Len(Text1.Text) > 3 Then
Text1.Text = Mid(Text1.Text, 1, 3)
End If
If Mid(Text1.Text, (Len(Text1.Text)), 1) = "\" Then
Text1.Text = Mid(Text1.Text, 1, (Len(Text1.Text) - 1))
End If
End If
If you try to fill out \\\\ you wil get an error.