|
-
Sep 2nd, 2005, 05:09 PM
#1
Thread Starter
Lively Member
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 !
-
Sep 5th, 2005, 02:21 AM
#2
Lively Member
Re: Newbie --- Need help with this ....
You can try this
Code:
Function ReplaceDot(strIn as String) as String
ReplaceDot = Replace(strIn, ".", "")
End Function
-
Sep 5th, 2005, 02:49 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|