0 Replies - 2378 Views - Last Post: 08 January 2009 - 04:50 AM Rate Topic: -----

#1 yampiric8x  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 08-January 09

MS Excel Shockwave Flash Control (VBA macro)

Posted 08 January 2009 - 04:50 AM

"Blad14" is a worksheet, "ExcelTV" is a Shockwave Flash Control, YouTube ID's are removed and replaced with ID1, ID2, etc.
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


Is This A Good Question/Topic? 0
  • +

Page 1 of 1