here's what i used:
======================
Private Sub Command3_Click()
Dim mFileSysObj As New FileSystemObject
Dim mFile As File
Dim mTxtStream As TextStream
If mFileSysObj.FileExists("c:\clients.dat" = False Then
Call mFileSysObj.CreateTextFile("c:\clients.dat" 'create new clients.dat
Set mFile = mFileSysObj.GetFile("c:\clients.dat"
Set mTxtStream = mFile.OpenAsTextStream(ForAppending)
Call mTxtStream.WriteLine("whatever you want to write"
Call mTxtStream.Close
Else
Set mFile = mFileSysObj.GetFile("c:\clients.dat"
Set mTxtStream = mFile.OpenAsTextStream(ForAppending)
Label4.Caption = mFile.Path
Call mTxtStream.WriteLine(strBanner) 'writes to file
Call mTxtStream.Close
End If
End Sub
==================
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.