existenci souboru ve slozce lze overit takto:
Sub File_Exist()
Dim FSO
Dim File As String
Dim Path As String
Dim FullName As String
Path = "C:\Documents and Settings\pokorny9\Plocha\Download\"
File = "obrazek.jpg"
FullName = Path & File
Set FSO = CreateObject("Scripting.FileSystemObject")
If Not FSO.FileExists(FullName) Then
MsgBox File & " NENÍ umístěn v zadane složce", vbInformation, "Soubor nenalezen"
Else
MsgBox File & " je umístěn v zadane složce", vbInformation, "Soubor nalezen"
End If
End Subcitovat
Sub File_Exist()
Dim FSO
Dim File As String
Dim Path As String
Dim FullName As String
Path = "C:\Documents and Settings\pokorny9\Plocha\Download\"
File = "obrazek.jpg"
FullName = Path & File
Set FSO = CreateObject("Scripting.FileSystemObject")
If Not FSO.FileExists(FullName) Then
MsgBox File & " NENÍ umístěn v zadane složce", vbInformation, "Soubor nenalezen"
Else
MsgBox File & " je umístěn v zadane složce", vbInformation, "Soubor nalezen"
End If
End Subcitovat