Results 1 to 3 of 3

Thread: quotes while saving

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482

    Post

    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??

  2. #2
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Use this code to remove quotes from the ends of a string:
    Code:
    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 Add Me ICQ Me
    AIM: TomY10
    PERL, JavaScript and VB Programmer

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    To save to a File without the Quotes, use Print # not Write #

    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    adyoung@win.bright.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width