Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Append Text (VB6)

    I am trying to write to a text file when I click a command button on a form. When this runs it sends the meesage to the text file but it has inverted commas around it. How can I bet rid of them? Here is the code I am using, can someone make comment.

    Private Sub cmdExec_Click()
    Dim strroute As String
    Dim strFile As String

    strroute = "[Mymessage]"

    strFile = "[filelocation]"

    Open strFile For Append As #1
    Write #1, strroute

    Close #1

    cmdExec.Enabled = False

    End Sub
    Jerry

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Append Text (VB6)

    Try using

    Print #1, strroute

    Andrew C

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Append Text (VB6)

    Thank you, that is perfect
    Jerry

Posting Permissions

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