Removing a character from a text string

  • Thread starter Thread starter NeilO
  • Start date Start date
N

NeilO

How to remove a special character from a text string in
VBA based on a user input/table. Please provide a sample
or redirect me to a help area
 
Neil, go crazy next time & try providing a teeny bit more information!

This will remove all occurrences of the special character chr$(5) from the
string s.

(untested)

n = instr (s, chr$(5))
while n > 0
s = left$ (s, n - 1) & mid$ (s, n + 1)
n = instr (s, chr$(5))
wend

Does that help?
TC
 
Back
Top