habe ein macro wo zuerst das verzeichniss abgefragt wird und dann werden die dateien eingelesen und in hyperlinks umgewandelt und sobald ich auf einen hyperlink klicke soll winamp mir das mp3 file abspielen,
aber leider funktioniert der hyperlink nicht mehr , seit ich die verzeichniss abfrage eingebaut habe. warum???bitte um hilfe
ivan martinov
Private Sub ordner_Click()
'verzeichniss einlesen
Dim sFile As String, sPattern As String, sPath As String
Dim iRow As Integer
Columns(1).ClearContents
sPath = InputBox( _
prompt:="Pfad:", Default:="d:\A_Musik")
If Right(sPath, 1) <> "\" Then sPath = sPath & "\"
sPattern = InputBox( _
prompt:="Dateifilter:", Default:="*.mp3")
sFile = Dir(sPath & sPattern)
Do Until sFile = ""
iRow = iRow + 1
Cells(iRow, 1).Value = sFile
sFile = Dir()
Loop
'an dieser stelle hab ich die zwei macros zusammen geführt
Dim Datei
Dim Pfad As String
Dim intZeile As Integer
Pfad = ActiveWorkbook.Path & "\"
intZeile = 2
Datei = Dir(Pfad & "*.mp3")
Do While Datei <> ""
ActiveSheet.Hyperlinks.Add Anchor:=Cells(intZeile, 1), _
Address:=Pfad & Datei, _
TextToDisplay:=Pfad & Datei
intZeile = intZeile + 1
Datei = Dir()
Loop
End Sub