'überprüfung, ob Laufwerk "E" existiert Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If DriveExists("E:") = True Then MsgBox("E: existiert") Else MsgBox("E: existiert nicht") End If End Sub 'Funktion zur überprüfung des ausgewählten Laufwerks Public Function DriveExists( _ ByVal sDriveLetter As String) As Boolean Dim sLogicalDrive As String Dim sLogicalDrives As String() sDriveLetter = vb.Left(sDriveLetter, 1) & ":" sLogicalDrives = System.IO.Directory.GetLogicalDrives() For Each sLogicalDrive In sLogicalDrives If sLogicalDrive = sDriveLetter Then Return True End If Next End Function