Re: Trim() does not work with Tab charachters



The VBA Replace function would be easier.

Here is an example (with your trim problem), it replaces all tabs with
spaces and the tabs before or after the string will be stripped by the Trim

Dim str As String

str = vbTab & "john" & vbTab & vbTab
Debug.Print "["; str; "]"

str = Trim(str)
Debug.Print "["; str; "]"

str = Trim(Replace(str, vbTab, " "))
Debug.Print "["; str; "]"

John... Visio MVP

"Dennis" <Dennis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F971A13A-A49C-48C9-A11B-504F15857320@xxxxxxxxxxxxxxxx
Well, you COULD use INSTR to see if there are any Tabs, and then spin
through
the string and remove them.



.