CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: opening files

  1. #1
    Join Date
    Mar 1999
    Posts
    37

    opening files



    Trying to open a file, and then append data to it... how can I do this?


    So far I have:


    Open App.Path & "\output.txt" For Random As #OutputFile Len = Len(MyRecord)


    thanks...

  2. #2
    Join Date
    Apr 1999
    Location
    Sweden
    Posts
    14

    Re: opening files



    There is another way to do what you want but this should work.


    Public FileNumber As Integer

    Public strFileName As String


    Dim strStringToWrite As String


    strFileName="c:\folder\name.txt"

    strStringToWrite ="Some data"


    Open strFileName$ For Append As #FileNumber

    Print #FileNumber, strStringToWrite

    Close #FileNumber



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

Featured