I want to replace certain characters with a space or nothing. But when the code gets to Case "'", "(", ")"
it does nothing it does not replace a single quote with nothing it leaves it alone.
so the string still has a single quote in it.
My Dog's house
becomes
My_Dog's_house
I need it to be
My_Dogs_house (no single quote)
here is my code
TIA
DougP, MCP, A+
I love this site and all you folks that helped me over the years!
it does nothing it does not replace a single quote with nothing it leaves it alone.
so the string still has a single quote in it.
My Dog's house
becomes
My_Dog's_house
I need it to be
My_Dogs_house (no single quote)
here is my code
Code:
For a = 1 To Len(data1)
Select Case Mid(data1, a, 1)
Case " ", "#", "&"
Mid(data1, a, 1) = "_"
Case "'", "(", ")"
Mid(data1, a, 1) = "" 'single quote: remove and put nothing
Case Else
'do nothing, characters are normal
End Select
Next
TIA
DougP, MCP, A+
I love this site and all you folks that helped me over the years!