here is code that works good until it repeats and does not end until manual stop - help
Sub PLAYSONG()
REQ_B = 100001
'skip1 for PLAY_Q test
' GoTo NOK
'skip1 end
Application.ScreenUpdating = False
If REQ_B > 199999 Then
GoTo NOK
Else
DR_L = ActiveCell.Address: DR_A = Application.ActiveCell.Row
DR_K = "": Range(DR_G).Select
For DR_H = 1 To DR_J
Selection.Find(What:=DUP_B, Lookat:=xlWhole).Activate
DR_P = ActiveCell.Offset(-(ActiveCell.Row() - 1), 0).Value
If DR_H = DR_J Then
DR_K = DR_K & DR_P
Else: DR_K = DR_K & DR_P & " ¦ "
End If
DR_M = ActiveCell.Address
Range(DR_M & ":" & ("GD" & ActiveCell.Row)).Select
Next
Range("IncludeOnShows").Value = DR_K: Sheets("Display").Activate
Range("A1").Activate
End If
NOK:
PLAY_G = 0: Play_A = Range("FileLoc").Value
PLAY_D = Range("LinkAddress").Value: PLAY_B = FileLen(Play_A)
PLAY_B = PLAY_B / 10584062: PLAY_B = Round(PLAY_B, 5): PLAY_E = Len(PLAY_B)
PLAY_C = Application.Search(".", PLAY_B): PLAY_F = Int(Left(PLAY_B, PLAY_C - 1)) ' minutes
If Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 5 Then
PLAY_G = (Int(Right(PLAY_B, PLAY_E - PLAY_C)) * 0.00001)
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 4 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "0") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 3 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "00") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 2 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "000") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 1 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "0000") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 0 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "00000") * 0.00001
End If
PLAY_G = (PLAY_G * 60) ' seconds
Range("LinkAddress").Activate
'skip2 for PLAY_Q
' GoTo Skip3
'skip2 for PLAY_Q
'hypercreate
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=Play_A, _
TextToDisplay:=Play_A
'hyperend
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Sheets("fIELD").Activate
'Dim P_SHAPES As ShapeRange: Set P_SHAPES = ActiveSheet.Shapes.Range("PlayButton")
Application.ScreenUpdating = True: Application.ScreenUpdating = False
'Skip3:
If PLAY_F > 60 Then
PLAY_K = Round(PLAY_F / 60, 0): PLAY_F = PLAY_F - (60 * PLAY_K)
Else
PLAY_K = 0
End If
End Sub
Sub PLAYSONG()
REQ_B = 100001
'skip1 for PLAY_Q test
' GoTo NOK
'skip1 end
Application.ScreenUpdating = False
If REQ_B > 199999 Then
GoTo NOK
Else
DR_L = ActiveCell.Address: DR_A = Application.ActiveCell.Row
DR_K = "": Range(DR_G).Select
For DR_H = 1 To DR_J
Selection.Find(What:=DUP_B, Lookat:=xlWhole).Activate
DR_P = ActiveCell.Offset(-(ActiveCell.Row() - 1), 0).Value
If DR_H = DR_J Then
DR_K = DR_K & DR_P
Else: DR_K = DR_K & DR_P & " ¦ "
End If
DR_M = ActiveCell.Address
Range(DR_M & ":" & ("GD" & ActiveCell.Row)).Select
Next
Range("IncludeOnShows").Value = DR_K: Sheets("Display").Activate
Range("A1").Activate
End If
NOK:
PLAY_G = 0: Play_A = Range("FileLoc").Value
PLAY_D = Range("LinkAddress").Value: PLAY_B = FileLen(Play_A)
PLAY_B = PLAY_B / 10584062: PLAY_B = Round(PLAY_B, 5): PLAY_E = Len(PLAY_B)
PLAY_C = Application.Search(".", PLAY_B): PLAY_F = Int(Left(PLAY_B, PLAY_C - 1)) ' minutes
If Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 5 Then
PLAY_G = (Int(Right(PLAY_B, PLAY_E - PLAY_C)) * 0.00001)
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 4 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "0") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 3 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "00") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 2 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "000") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 1 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "0000") * 0.00001
ElseIf Len(Right(PLAY_B, PLAY_E - PLAY_C)) = 0 Then
PLAY_G = Int(Right(PLAY_B, (PLAY_E - PLAY_C)) & "00000") * 0.00001
End If
PLAY_G = (PLAY_G * 60) ' seconds
Range("LinkAddress").Activate
'skip2 for PLAY_Q
' GoTo Skip3
'skip2 for PLAY_Q
'hypercreate
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=Play_A, _
TextToDisplay:=Play_A
'hyperend
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Sheets("fIELD").Activate
'Dim P_SHAPES As ShapeRange: Set P_SHAPES = ActiveSheet.Shapes.Range("PlayButton")
Application.ScreenUpdating = True: Application.ScreenUpdating = False
'Skip3:
If PLAY_F > 60 Then
PLAY_K = Round(PLAY_F / 60, 0): PLAY_F = PLAY_F - (60 * PLAY_K)
Else
PLAY_K = 0
End If
End Sub