Click to See Complete Forum and Search --> : quotes while saving
progeix
Nov 25th, 1999, 07:39 AM
Hello.. when i make my program save textbox Text or any text it keeps saving the text into quotes like i would put
Write #1, Textbox.text (Textbox has "Blarb")
Inside the saved file:
"Blarb"
is there a way when i save text to get rid of the quotes inside the file??
Compwiz
Nov 25th, 1999, 09:06 AM
Use this code to remove quotes from the ends of a string:
Private Sub Command1_Click()
Text1.Text = ChopQuotes(Text1.Text)
End Sub
Function ChopQuotes(ByVal str As String) As String
On Error Resume Next
Dim ReturnValue As String
ReturnValue = str
If Left$(ReturnValue, 1) = Chr(34) Then ReturnValue = Right$(ReturnValue, Len(ReturnValue) - 1)
If Right$(ReturnValue, 1) = Chr(34) Then ReturnValue = Left(ReturnValue, Len(ReturnValue) - 1)
ChopQuotes = ReturnValue
End Function
------------------
Tom Young, 14 Year Old
tyoung@stny.rr.com
ICQ: 15743470 (http://wwp.icq.com/15743470) Add Me (http://wwp.icq.com/scripts/search.dll?to=15743470) ICQ Me (http://wwp.icq.com/scripts/contact.dll?msgto=15743470)
AIM: TomY10 (http://www.aol.com/aim/aim30.html)
PERL, JavaScript and VB Programmer
Aaron Young
Nov 25th, 1999, 11:21 AM
To save to a File without the Quotes, use Print # not Write #
------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.