Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing Special Characters

Status
Not open for further replies.

OrWolf

MIS
Mar 19, 2001
291
I'm trying to develop a function to replace any special characters that are input by the user. I'm really close, however the I can't replace a value with null or "". My only option seems to be replacing with a space, and this can leave the entered data looking rather odd. Does any one know a better way to do this then below?

BadCharPos = InStr(1, InputVal, SpecialChar)
If BadCharPos > 0 Then
Mid(InputVal, BadCharPos) = " "
End If

Thanks for your help!
 
did you try replacing it with a ""
no space between the quotes.
You can set something to a null also

x = null

Not sure exactly what you are doing.

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top