coolcatkelso
Registered User.
- Local time
- Today, 12:32
- Joined
- Jan 5, 2009
- Messages
- 279
Getting Variable Not Defined Error
This is the line of the error
Set f = fs.getfile("C:\Demo\TEST.txt")
________
JUSTIN BIEBER FANS
Code:
Option Compare Database
Option Explicit
Dim fs As New FileSystemObject
Private Sub Command1_Click()
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CreateTextFile "C:\Demo\TEST.txt" 'Create a file - change this to any directory you wangt to hide the text file
'Write to file
Set f = fs.getfile("C:\Demo\TEST.txt")
Set ts = f.OpenAsTextStream(ForWriting, TristateUseDefault)
ts.writeline "Thanks for using this Software" 'change this to what you want
ts.Close
End Sub
This is the line of the error
Set f = fs.getfile("C:\Demo\TEST.txt")
________
JUSTIN BIEBER FANS
Last edited: