Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6742095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:48:09+00:00 2026-05-26T11:48:09+00:00

Hey I am trying to write some data into a fail using a table.

  • 0

Hey I am trying to write some data into a fail using a table.
I get it to work but, every time I add a new piece of data the last piece of data is overwritten causing the file to remain 2 lines long.

Every time I click Button1 I want it to send to file all the previous data captured.

        My.Computer.FileSystem.WriteAllText("C:\Users\Michael\Documents\University\Application Programming\Assignment\Logs\AuditLog.htm", "<table border=1 width=100%>  <tr><td> Staff Name </td> <td> Computer Number </td> <td> Fault </td> <td> Assigned Technician </td> <td> Date Submitted </td> </tr> ", False)
    My.Computer.FileSystem.WriteAllText("C:\Users\Michael\Documents\University\Application Programming\Assignment\Logs\AuditLog.htm", "<tr> <td> <b> </b>" & StaffName & "</td> <td>" & ComputerNumber & "</td> <td>" & Fault & "</td> <td> " & AssignedTechnician & "</td> <td> " & DateSub & "</tr>", True)

This is where my problem is at. Im thinking I need a for loop of some kind on the second line. But not to sure how to go about it.

Any help appreciated. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:48:09+00:00Added an answer on May 26, 2026 at 11:48 am

    Look at this code

    Dim FILE_NAME As String = "C:\Users\Owner\Documents\test.txt"
    Dim i As Integer
    Dim aryText(4) As String
    
    aryText(0) = "Mary WriteLine"
    aryText(1) = "Had"
    aryText(2) = "Another"
    aryText(3) = "Little"
    aryText(4) = "One"
    
    Dim objWriter As New System.IO.StreamWriter(FILE_NAME, True)
    
    For i = 0 To 4
    objWriter.WriteLine(aryText(i))
    Next
    
    objWriter.Close()
    MsgBox("Text Appended to the File")
    

    There more info here and here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I'm trying to get threading to work in ASP.NET but for some
Hey all, I'm currently trying to write a compile-time string encryption (using the words
Hey guys...I am trying to get some data based on a condition which I
Hey i'm just trying to write some code in DrScheme: ((function (x) (* x
Hey all, I'm trying to write a sort function but am having trouble figuring
Hey I'm trying to load a Lua file into my c++ project but there
Hey guys, am trying to write to do type casting in java, but i
Hey, I am trying to write a command to print todays date on the
Hey there. I'm trying to write a small program that will read the four
Hey I'm new to java servlets and I am trying to write one that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.