' Req'd Refs: Late Binding -> None required
' Early Binding -> Microsoft Scripting Runtime
#Const FSO_EarlyBind = True
#If FSO_EarlyBind = True Then
Private pFSO As Scripting.FileSystemObject
#Else
Private pFSO As Object
#End If
#If FSO_EarlyBind = True Then
Public Function oFSO() As Scripting.FileSystemObject
#Else
Public Function oFSO() As Object
#End If
If pFSO Is Nothing Then
#If FSO_EarlyBind = True Then
Set pFSO = New FileSystemObject
#Else
Set pFSO = CreateObject("Scripting.FileSystemObject")
#End If
End If
Set oFSO = pFSO
End Function
Public Sub oFSO_Clear()
'Be sure to always run this when closing your Form/DB to avoid
' hidden instances from running in the background!
Set pFSO = Nothing
End Sub
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter