johnlopez2000
Programmer
I am attempting to use the FileSystemObject to manipulate some files.
However, VB6 does not seem to recognize the FileSystemObject. The compiler complains that:
"User defined type not defined"
for the statement:
Dim FS As New FileSystemObject
Alternately, the Scripting FileSystemObject does seem to work:
Dim Compname As String, FilName As String
Dim fil As Object
Compname = "testfile"
FilName = "c:\temp\" + Compname + ".txt"
Dim fso, txtfile
Set fso = CreateObject("Scripting.FileSystemObject")
Set fil = fso.CreateTextFile(FilName, True)
...
Have I not or do I need to, refenence some library? or load some DLL or declare some function? How would I do that?
thanks
John Lopez
Enterprise PDM Architect
john.l.lopez@goodrich.com
However, VB6 does not seem to recognize the FileSystemObject. The compiler complains that:
"User defined type not defined"
for the statement:
Dim FS As New FileSystemObject
Alternately, the Scripting FileSystemObject does seem to work:
Dim Compname As String, FilName As String
Dim fil As Object
Compname = "testfile"
FilName = "c:\temp\" + Compname + ".txt"
Dim fso, txtfile
Set fso = CreateObject("Scripting.FileSystemObject")
Set fil = fso.CreateTextFile(FilName, True)
...
Have I not or do I need to, refenence some library? or load some DLL or declare some function? How would I do that?
thanks
John Lopez
Enterprise PDM Architect
john.l.lopez@goodrich.com