AW: mit einem Hyperlink 2 Ziele simultan öffnen
Josef
Hallo Holger,
das geht meines Wissens nur mit VBA.
Die Dateinamen stehen in Spalte C und sind durch Semikolon (;) getrennt.
Im Code musst du den Pfad zu den Dateien noch anpassen.
Per Doppelklick auf die Zelle werden die Dateien mit dem Standardprogramm geöffnet.
' **********************************************************************
' Modul: Tabelle2 Typ: Element der Mappe(Sheet, Workbook, ...)
' **********************************************************************
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim strPath As String, strFiles As Variant, lngIndex As Long
strPath = "E:\Temp\" 'Pfad zu den Musikdateien - Anpassen!
If Right(strPath, 1) <> "\" Then strPath = strPath & "\"
If Target.Column = 3 Then
Cancel = True
strFiles = Split(Target, ";")
For lngIndex = 0 To UBound(strFiles)
openFile strPath & Trim(strFiles(lngIndex))
Sleep 500
Next
End If
End Sub
Private Sub openFile(ByVal FileName As String)
ShellExecute 0, "Open", FileName, "", "", 7
End Sub
Gruß Sepp