Solved

Saving Data Like A Log Book

Posted on 1999-01-16
5
166 Views
Last Modified: 2010-05-03
How do you save data(text) so it can be loaded later for further referance. Like a sports log book?
0
Comment
Question by:gordolove
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:traygreen
ID: 1469047
The data can be saved either in a database, flat file or binary file
Are you looking for a simple file solution?
0
 
LVL 3

Expert Comment

by:traygreen
ID: 1469048
a simple ascii text file example
Private Sub WriteRecord(pName As String, pSport As String, pPosition As String)
   Open "c:\temp.txt" For Output As #1
   Write #1, pName, pSport, pPosition
   Close #1
End Sub
0
 

Author Comment

by:gordolove
ID: 1469049
I keep getting error messages when I try the string. I am new at this, so what do I have to custimize to get it to work?
0
 
LVL 1

Accepted Solution

by:
carlosvs earned 100 total points
ID: 1469050
If you need a log file try this:
sub WriteLog(LFile as String,LogTitle as String, LogText as String)
     Open LFile For Append As #1
     print #1, LogTitle & ": " & LogText
     close #1
end sub

example:
WriteLog "C:\MyFile.txt","Start UP","The Aplication Start"
This program will append to the Lfile...
0
 
LVL 1

Expert Comment

by:carlosvs
ID: 1469051
if you need to see your log in a form try
Rich Textbox Control.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question