Guten Tag,
kann man mit Shell Programm direkt eine Datei öffnen ?
Hiermit gehe ich ins Verzeichnis:
Dim Pfad As String
Pfad = "C:\Eingang"
Shell "explorer.exe /n, /e, " & Pfad, vbMaximizedFocus
gruß Sigrid
mit shell Datei öffnen ?
Re: mit shell Datei öffnen ?
Habe die Lösung gefunden:
Private Sub Privat_Click()
Static bOpened As Boolean
Dim strFullPath As String
strFullPath = "C:\Privat\_Bücher.accdb"
If Dir(strFullPath, vbDirectory) <> "" Then
Shell Environ("WinDir") & "\explorer.exe /n,/e," & strFullPath, vbNormalFocus
Else
MsgBox "Verzeichnis oder Datei " & IIf(bOpened, " ", "") & " nicht vorhanden!", vbCritical
End If
bOpened = True
End Sub
gruß sigrid
Private Sub Privat_Click()
Static bOpened As Boolean
Dim strFullPath As String
strFullPath = "C:\Privat\_Bücher.accdb"
If Dir(strFullPath, vbDirectory) <> "" Then
Shell Environ("WinDir") & "\explorer.exe /n,/e," & strFullPath, vbNormalFocus
Else
MsgBox "Verzeichnis oder Datei " & IIf(bOpened, " ", "") & " nicht vorhanden!", vbCritical
End If
bOpened = True
End Sub
gruß sigrid