Function CheckForFile() As Boolean
On Error GoTo ErrHandle
Open "C:\File.txt" For Input As #1: Close #1
CheckForFile = True
Exit Sub
ErrHandle: CheckForFile = False
End Function
Sub AProcedure()
If CheckForFile Then
'файл готов
Else
'файл не готов
End If
End Sub
A.A.Z. писал(а):
- Код: Выделить всё
Sub AProcedure()
If CheckForFile Then
'файл готов
Else
'файл не готов
End If
End Sub
Сейчас этот форум просматривают: Google-бот, Yandex-бот и гости: 28