Anyone else get a type mismatch on the 'CreateTextFile'?
It works for 'OpenTextFile'
Private Sub Command1_Click()
Dim fso As New FileSystemObject
Dim f As File
Dim ts As TextStream
'Create a new file
Set f = fso.CreateTextFile("C:\test.txt")
Set ts = f.OpenAsTextStream(ForAppending)
Set f = Nothing
Set ts = Nothing
Thanks. I am well aware that the Open statement is an (often simpler) alternative.
I'm trying to find out whether or not FSO is working as it should.
FSO was created to provide specific advantages over the older file I/O statements and functions, the obvious one being object-oriented cababilities.
The 'simplicity' of my post was designed to focus on a specific feature/problem.