To replace consecutive spaces with just one space, you can do something like this:
While InStr(dfInfo,” “) > 0
dfInfo = ReplaceAll(dfInfo, ” “, ” “)
Wend
This keeps replacing 2 consecutive spaces with one space. Turning multiple spaces in single space. Simple, without state machines, etc.

You must be logged in to post a comment.