pcc
Well-known Member
- Joined
- Jan 21, 2003
- Messages
- 1,382
- Office Version
- 2021
- Platform
- Windows
VBA Code:
Public wmp As Object
Sub aaTest()
Dim r As Long
lr = [a1].CurrentRegion.Rows.Count
For r = 2 To lr
If Cells(r, 2) = "Y" Then
Set wmp = CreateObject("new:6BF52A52-394A-11D3-B153-00C04F79FAA6")
With wmp
.URL = Cells(r, 1)
.Controls.Play
End With
DoEvents
End If
Next r
End Sub
I have the above code. I am trying to get Excel to play several mp3 files in succession. However, all it does is play the last row that has a "Y" in column 2.
How can I get it to play each one, waiting until the song has finished before playing the next one?
Hope someone can help
Regards