I try to load different YouTube online videos into the "ExcelTV" control by Excel in-cell dropdown menu changes. My question is:
Why does it succeed the first time I change the specified "B2" cell, but when I change it again, it loads the YouTube player only without content? The control itself has the right URL - do I need to reset the control somehow?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$2" Then
If Range("B2").Value = "Part 1" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID1"
If Range("B2").Value = "Part 2" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID2"
If Range("B2").Value = "Part 3" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID3"
If Range("B2").Value = "Part 4" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID4"
If Range("B2").Value = "Part 5" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID5"
If Range("B2").Value = "Part 6" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID6"
If Range("B2").Value = "Part 7" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID7"
If Range("B2").Value = "Part 8" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID8"
If Range("B2").Value = "Part 9" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID9"
If Range("B2").Value = "Part 10" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID10"
If Range("B2").Value = "Part 11" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID11"
If Range("B2").Value = "Part 12" Then Blad14.ExcelTV.Movie = "http://www.youtube.com/v/ID12"
End If
End Sub
This post has been edited by yampiric8x: 08 January 2009 - 04:53 AM

New Topic/Question
Reply




MultiQuote


|