ist die Prüfung auf existenz von Laufwerken möglich?
so gehts bei nicht:
if DriveExists("Y:") = False then exit sub
könnt Ihr mir helfen?
Danke Eeuer
Tino
Function PathFileExists Lib "shlwapi.dll" _
Alias "PathFileExistsA" ( _
ByVal pszPath As String) As Long
Public
Function IsFilePath(strPath As String) As Boolean
IsFilePath = CBool(PathFileExists(strPath))
End Function
Sub vv()
If IsFilePath("Y:") = False Then Exit Sub
End Sub
Euer Tino
Sub drive_exists()
Dim fs As Object
Dim testdrive As String
testdrive = "W:"
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.DriveExists(testdrive) Then
MsgBox "Drive >" & testdrive & "< existiert."
Else
MsgBox "Drive >" & testdrive & "< existiert nicht."
End If
End Sub