OpenTextFile problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Access 2002. I have this code developed. I originally developed
this for Access 2000 and it works fine. In 2002 I get an error message at
line 5 where the Set tex = fs.OpenTextFile is coded. Any suggestions as to
why and how to fix it?

Thank you.

Private Sub btnBackText_Click()
Dim tex As TextStream 'declare text stream
Dim fs As FileSystemObject 'declare object
Set fs = New FileSystemObject 'instantiate object
Set tex = fs.OpenTextFile("PathForTextBackUP", ForReading, False) 'read
file for path
tex.ReadLine 'set variable to path
tex.Close 'close file
Set tex = Nothing 'release object
Set fs = Nothing 'release object
BackUpTextToA (strPath) 'call procedure to back up text to a drive
End Sub
 
Back
Top