L
Ludo
Hi,
I'm using following code witch work fine to select a file on a remote
PC, connected via network.
But there's one withdraw:
If the remote PC is too busy, or the network connection fails, there's
no time-out to escape from the routine.
Question now is if it's possible to implement a time-out so that i can
bail out of the routine, and if possible, how to do it.
frmSelectFMT_Log_Kast.Show
If blCancelSelect = False Then Exit Sub
With Application.FileDialog(msoFileDialogOpen)
If inHassKast = 1 Then
.InitialFileName = FMT_LogFiles1 'FMT LOG files kast
1 !!!
.Title = "FMT LOG files kast 1"
Else
.InitialFileName = FMT_LogFiles2 'FMT LOG files kast
2 !!!
.Title = "FMT LOG files kast 2"
End If
.AllowMultiSelect = False
.InitialView = msoFileDialogViewDetails
.Show
'<< hangs when network down or PC too busy to answer
If .SelectedItems.Count = 0 Then Exit Sub
FName = .SelectedItems(1)
End With
Any help is welcome.
Regards,
Ludo
I'm using following code witch work fine to select a file on a remote
PC, connected via network.
But there's one withdraw:
If the remote PC is too busy, or the network connection fails, there's
no time-out to escape from the routine.
Question now is if it's possible to implement a time-out so that i can
bail out of the routine, and if possible, how to do it.
frmSelectFMT_Log_Kast.Show
If blCancelSelect = False Then Exit Sub
With Application.FileDialog(msoFileDialogOpen)
If inHassKast = 1 Then
.InitialFileName = FMT_LogFiles1 'FMT LOG files kast
1 !!!
.Title = "FMT LOG files kast 1"
Else
.InitialFileName = FMT_LogFiles2 'FMT LOG files kast
2 !!!
.Title = "FMT LOG files kast 2"
End If
.AllowMultiSelect = False
.InitialView = msoFileDialogViewDetails
.Show
'<< hangs when network down or PC too busy to answer
If .SelectedItems.Count = 0 Then Exit Sub
FName = .SelectedItems(1)
End With
Any help is welcome.
Regards,
Ludo