Results 1 to 5 of 5

Thread: Writing to a file

  1. #1
    Guest

    Exclamation

    Hi all,

    I seem 2 B having a little problem.

    I use Open --- for append as #1 as I dont want to lose any info already in the file.

    However, It always puts a blank line between each entry. Is there any way to prevent this?

    thanx

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Let's see your code and a small few lines of the file
    before and after.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest
    Private Sub mnuFaveAdd_Click()
    Open App.Path & "\fave.txt" For Append As #2
    Print #2, brwWebBrowser.LocationURL
    Close #2
    End Sub

  4. #4
    New Member
    Join Date
    Oct 2000
    Location
    Israel
    Posts
    2

    Cool Writing to a file...

    Hi...

    When writing to a file, use the Print # statement.

    But:
    At the end of the expretion use ";" or "," like this:

    Open filename For Append As #1
    Print #1, "Hello";
    Print #1, "World"
    Close #1

    This will create a string of "HelloWorld" in the file.

    (with a /cr after the string "World" because of the
    lack of ";")

    Bye Bye...
    Nir Atzitz.

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    It mush have something to do with the browser control's version of returning the item to you. With text files that would not and does not leave a line.
    Try putting it in a string first and then removing blank spaces
    Ie.
    myString = brwWebBrowser.LocationURL
    myString = Trim(myString)
    Print #2, myString
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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