Wie kann ich in vba zwei Laufwerke angeben?
Also nicht nur Laufwerk E: sondern auch Laufwerk D:
'Const FOLDER_PATH As String = "E:\" hier müsste irgendwie eine Abfrage rein wenn auf E: nichts ist, dann auf D: wechseln!!!
Const FOLDER_PATH As String = "D:\"
Dim strFielName As String
Dim objCell As Range
For Each objCell In Range(Cells(2, 1), Cells(Rows.Count, 1).End(xlUp))
strFielName = Dir$(FOLDER_PATH & objCell.Text & " (*).*")
If strFielName vbNullString Then
Call objCell.Hyperlinks.Add(Anchor:=objCell, Address:= _
FOLDER_PATH & strFielName, TextToDisplay:=objCell.Text)
End If
Next
Gruß
Oraculix