Comment by personalityson
2 years ago
Public Function Fso() As Object
Static s_oFso As Object
If s_oFso Is Nothing Then
Set s_oFso = CreateObject("Scripting.FileSystemObject")
End If
Set Fso = s_oFso
End Function
Fso.FileExists("path")
>CreateObject("Scripting.FileSystemObject")
That's not included by default in Windows 95. (A lot of classic VB6 apps of that era ran on Win95.) In contrast, "kernel32.dll" is always included.
Even for the later Windows 98, using "Scripting.FileSystemObject" as a dependency was fragile and could fail:
https://www.tek-tips.com/threads/forms-do-not-open-in-window...
https://www.vbforums.com/showthread.php?135362-running-vbs-f...