If the file is to be saved a routine is performed to see if drive G (a mapped network drive) can be accessed.
for the test this subroutine

[VBA]Sub Test_G()
If DExist("g") = 2 Then
Call G_Exist
End If
If DExist("g") <> 2 Then
Call G_Do_Not_Exist
End If
End Sub[/VBA]


and this function is used

[VBA]Public Function DExist(OrigFile As String)
Dim fs, d
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.driveexists(OrigFile) = True Then
Set d = fs.getdrive(OrigFile)
DExist = 1
If d.isready = True Then
DExist = 2
Exit Function
End If
Else
DExists = 0
End If
End Function[/VBA]

The problem is the following:

It seems as if Windows tries to open the network drive before the network connection is established and the drive is therefore not connected correctly.
Therefore, the file is saved on the user's desktop instead.
This provides assurance that the file can be saved after all, but is only meant as emergency procedure if the network is down.
If the network drive is accessed with Explorer before the subroutine is performed the drive is connected correctly, and the routine therefore works properly.
Is it possible to get routine to detect the drive even if Windows has not established the connection correctly?