Newbie --- Need help with this ....
How can I change the following code so that it eliminates the quotes ("...") from a text string stored in a column in Excel? Apparently, tthe code on the bottom will only remove empty spaces:
Public Function RemoveSpaces(strInput As String)
' Removes all spaces from a string of text
Test:
If InStr(strInput, " ") = 0 Then
RemoveSpaces = strInput
Else
strInput = Left(strInput, InStr(strInput, " ") - 1) _
& Right(strInput, Len(strInput) - InStr(strInput, " "))
GoTo Test
End If
End Function
Thank You !
Re: Newbie --- Need help with this ....
You can try this
Code:
Function ReplaceDot(strIn as String) as String
ReplaceDot = Replace(strIn, ".", "")
End Function
Re: Newbie --- Need help with this ....
If you want to remove QUOTES (") then use this:
VB Code:
Option Explicit
Private Sub Form_Load()
Dim str$
str = """test"""
str = Replace$(str, Chr(34), "") ' <------- Replace ALL occurrences
MsgBox str
End Sub