Results 1 to 3 of 3

Thread: Help with output of FILE

  1. #1

    Thread Starter
    Addicted Member nota141's Avatar
    Join Date
    Feb 2000
    Location
    The place down there under everyone else.
    Posts
    224
    I have these line of code in a program but it does not format the data so that the information is in colums

    Open FILE For Append As #1
    Print #1, fullname, objectname, fieldvalue,_
    timenow, datenow, COMPUTERNAME, macaddress
    Close #1
    End Function

    On Error wake up and try again ;-)
    ___________________________
    ICQ # 65392645
    email - [email protected]

    Visual Studio 6 ent with SP5 Running on XP with an AMD 1.2 ThunderBird with 512 MB RAM And a 120GB primary HDD (very sweet)

  2. #2
    Guest
    If you want to overwrite an existing file, use this:

    Code:
    Open "C:\FILE" For Output As #1
    Print #1, fullname, objectname, fieldvalue, _
    timenow, datenow, COMPUTERNAME, macaddress
    Close #1
    If you want to write to the end of it rather than overwriting it:

    Code:
    Open "C:\FILE" For Append As #1
    Print #1, fullname, objectname, fieldvalue, _
    timenow, datenow, COMPUTERNAME, macaddress
    Close #1
    For me, it is in columns..looks like this:

    Code:
    fullname      objectname    fieldvalue    timenow       datenow       COMPUTERNAME  macaddress
    If that doesn't work, try using vbTab.

    Code:
    Print #1, fullname & vbTab & objectname & vbTab & fieldvalue _
    & vbTab & timenow & vbTab &  datenow & vbTab & COMPUTERNAME & vbTab &  macaddress

  3. #3

    Thread Starter
    Addicted Member nota141's Avatar
    Join Date
    Feb 2000
    Location
    The place down there under everyone else.
    Posts
    224

    Thumbs up Thanks

    Thanks for that the last one works
    On Error wake up and try again ;-)
    ___________________________
    ICQ # 65392645
    email - [email protected]

    Visual Studio 6 ent with SP5 Running on XP with an AMD 1.2 ThunderBird with 512 MB RAM And a 120GB primary HDD (very sweet)

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