ich möchte aus einer Userform heraus eine PDF-Datei anzeigen lassen.
Leider funktioniert mein Code nicht.
Private Sub cmdPhoto_oeffnen_Click()
Dim sFile As String
Dim sPath As String
If cboPhoto_Ornder.Value = "" Then Exit Sub
sPath = "C:\Users\Documents\PDF_Dateien\" & cboName.Value & "\" & cboTitel.Value & "\"
sFile = cboPhoto_Ornder.Value
If Dir(sPath & sFile) = "" Then
Beep
MsgBox "Datei " & sFile & " wurde nicht gefunden!"
Else
Unload Me
CreateObject("WScript.Shell").Run "FoxitReader.exe"
'CreateObject("WScript.Shell").Open sPath & sFile
'CreateObject (sPath & sFile)
Shell (sPath & sFile)
End If
End Sub
Danke!
Gruß
Sigi