Private Sub Lance_RaDioXLDV3_Ontime_Temps()
On Error Resume Next
Application.OnKey "{F1}", "ArretOnTime"
Set the = Workbooks(ThisWorkbook.Name).Sheets("Radio XLD V3")
NL = the.Cells(ActiveCell.Row, 1).Row: If NL = 1 Then NL = 3
Application.ScreenUpdating = False
NLFIn = the.Cells(65536, 1).End(xlUp).Row
the.Rows("2:" & NLFIn).Select
Selection.RowHeight = 15.75
Application.ScreenUpdating = True
IE.Quit
Sleep 1000
Set IE = Nothing
Sleep 1000
Set IE = CreateObject("InternetExplorer.Application")
the.Cells(1, 11) = the.Cells(1, 11) + 1
Randomize
LigAct = Int(Rnd() * NLFIn)
the.Cells(LigAct, 1).Select
'lien = ActiveCell.Value
lien = the.Cells(LigAct, 1).Value
If the.Cells(1, 4) = "Temps chanson" Then durée = the.Cells(ActiveCell.Row, 1).Offset(0, 2) Else durée = the.Cells(1, 4).Text
the.Cells(1, 5) = Now: the.Cells(1, 6) = Now + durée: the.Cells(1, 6).NumberFormat = "h:mm:ss"
the.Cells(1, 7) = the.Cells(LigAct, 2): the.Cells(1, 8) = the.Cells(LigAct, 3)
'If the.CheckBox1 = True Then IE.Visible = False Else IE.Visible = True
IE.Visible = True
lien = ActiveCell.Value
'Parmètres IE (ouverture sur le lien et dimensions)
IE.Navigate "[url=http://www.youtube.com/watch?v]YouTube[/url]=" & lien
'IE.Top et IE.Left à 100 au départ
IE.Top = 100
IE.Left = 100
IE.Width = 1060
IE.Height = 640
Sleep 200
If the.Range("J1").Value = 0 Then GoTo suite
Sleep 200
If IE.Visible = True Then Application.SendKeys ("% "), True
If IE.Visible = True Then Sleep 200
If IE.Visible = True Then Application.SendKeys ("u"), True
If IE.Visible = True Then Application.SendKeys ("{NUMLOCK}"), True
Sleep 200
'Stop
suite:
Application.OnTime Cells(1, 6), "Lance_RaDioXLDV3_Ontime_Temps"
End Sub