Private Function RemoveVbCrlf(StrText As String) As String
If Right$(StrText, 2) = vbCrLf Then
RemoveVbCrlf = Left$(StrText, Len(StrText) – 2)
StrText = Left$(StrText, Len(StrText) – 2)
End If
If Left$(StrText, 2) = vbCrLf Then
RemoveVbCrlf = Right$(StrText, Len(StrText) – 2)
End If
If Len(RemoveVbCrlf) = 0 Then
RemoveVbCrlf = StrText
End If
End Function
If Right$(StrText, 2) = vbCrLf Then
RemoveVbCrlf = Left$(StrText, Len(StrText) – 2)
StrText = Left$(StrText, Len(StrText) – 2)
End If
If Left$(StrText, 2) = vbCrLf Then
RemoveVbCrlf = Right$(StrText, Len(StrText) – 2)
End If
If Len(RemoveVbCrlf) = 0 Then
RemoveVbCrlf = StrText
End If
End Function
No comments:
Post a Comment