Hi,
I'm writing a VB6 program in Windows XP, and then I try to run the program in Windows 98.
An error #91 (Object variable or With block variable not set) appears.
here is what I write in the code:
Dim fso As Scripting.FileSystemObject 'FileSystemObject
Dim ts As TextStream
Dim tsURL As String
...
tsURL = Mid(Drive1.Drive, 1, 2) & "\brg8a.txt"
Set fso = New Scripting.FileSystemObject
If fso.FileExists(tsURL) = False Then fso.CreateTextFile tsURL
Set ts = fs
penTextFile(tsURL, ForWriting)
...
Could someone help me with this?
Thanks.
Regards,
Rocky
I'm writing a VB6 program in Windows XP, and then I try to run the program in Windows 98.
An error #91 (Object variable or With block variable not set) appears.
here is what I write in the code:
Dim fso As Scripting.FileSystemObject 'FileSystemObject
Dim ts As TextStream
Dim tsURL As String
...
tsURL = Mid(Drive1.Drive, 1, 2) & "\brg8a.txt"
Set fso = New Scripting.FileSystemObject
If fso.FileExists(tsURL) = False Then fso.CreateTextFile tsURL
Set ts = fs
...
Could someone help me with this?
Thanks.
Regards,
Rocky