for/each followhyperlink address

  • Thread starter Thread starter Don Guillett
  • Start date Start date
D

Don Guillett

Posted yesterday on the L list with no response so trying here.

Not much to do today so listening to some music. xl2002.
I use something similar to this to play .mp3's from a double click event
using the typed name of the file. Now, I want to be lazy and have it play
more than one selection in a for/each loop. As usual it will play the
selection but when the song is finished I am still at wmp.

The question is how do I play the next song in the selection? TIA

C:\GordonLightfoot2\Gordon Lightfoot - Seven Island Suite.mp3
C:\GordonLightfoot3\Gordon Lightfoot - Shadows.mp3
C:\GordonLightfoot2\Gordon Lightfoot - She's Not The Same.mp3

Sub playselections()
For Each c In Selection
mc = Cells(c.Row, "e")
x = Right(Application.OperatingSystem, 4)
If x < 5 Then
cmd = "Start " & Chr(34) & mc & Chr(34)
Shell cmd 'works with xl97
Else
Dim FullFileName As String
FullFileName = mc
ActiveWorkbook.FollowHyperlink Address:=FullFileName
End If
Next c 'song
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top