03-05-2010, 02:14 PM
you have not defined 'ForAppending' anywhere in the code
add 'ForAppending = 8' this line at top. or
use below statement -
Set tf = fso.OpenTextFile("c:\testfile.txt", 8, True)
add 'ForAppending = 8' this line at top. or
use below statement -
Set tf = fso.OpenTextFile("c:\testfile.txt", 8, True)