Mike58
Advanced Member >PLATINUM PLUS<
Stesso Script con Filtro Condizione
Codice:
Sub Main
Dim Nu(1),aN(1),Rt1(1),Rt2(1)
Dim T,V,VV,VVV
Ini = EstrazioneFin - 200
fin = EstrazioneFin
ResetTimer
T = Array(T,"Numero","Ruota" & "Pos","Rit Att","R1","Tot1","R2","Tot2","R3","Tot3","TotTot","OK")
Call InitTabella(T,RGB(167,167,167),,3,5,"Arial Black")
For n = 1 To 90
For r1 = 1 To 10
For r2 = r1 + 1 To 12
If r2 = 11 Then r2 = 12
aa = EstrattoRitardo(r1,n,Ini,fin)
bb = EstrattoRitardo(r2,n,Ini,fin)
p1 = Posizione(fin - aa,r1,n)
p2 = Posizione(fin - bb,r2,n)
'If aa = bb And p1 = p2 Then
If aa = bb Then
Call Messaggio("Project By Miki55 . . . . . " & " A T T E N D E R E ")
Call AvanzamentoElab(1,90,n)
Rt1(1) = r1
Rt2(1) = r2
Nu(1) = n
aN(1) = n
ReDim rp(4)
ReDim rpp(4)
Inizio = EstrazioneIni
fine = fin - aa
fine2 = fin - bb
For z = 1 To 4
rp(z) = SerieRitardo(Inizio,fine,Nu,Rt1,1)
rpp(z) = SerieRitardo(Inizio,fine2,aN,Rt2,1)
fine = fine -(rp(z) + 1)
fine2 = fine2 -(rpp(z) + 1)
Next
Tot1 = aa + rp(2) : Tot2 = Tot1 + rp(3) : Tot3 = Tot2 + rp(4)
Tot4 = bb + rpp(2) : Tot5 = Tot4 + rpp(3) : Tot6 = Tot5 + rpp(4)
Tt1 = Tot1 + Tot2 + Tot3
Tt2 = Tot4 + Tot5 + Tot6
Tt3 = Tt1 + Tt2
If aa >= 18 And rp(2) >= 18 And rp(3) >= 18 And rp(4) >= 18 Then
v11 = "Ok"
Else
V11 = "-"
End If
If bb >= 18 And rpp(2) >= 18 And rpp(3) >= 18 And rpp(4) >= 18 And aa >= 18 And rp(2) >= 18 And rp(3) >= 18 And rp(4) >= 18 Then
V = Array(V,n,SiglaRuota(r1) & p1,aa,rp(2),Tot1,rp(3),Tot2,rp(4),Tot3,Tt1,v11)
Call AddRigaTabella(V,,,3,,"arial Black")
If p1 = p2 Then Call SetColoreCella(2,RGB(252,89,35),0)
Call SetColoreCella(1,RGB(252,89,35),0)
Call SetColoreCella(5,6,0)
Call SetColoreCella(7,6,0)
Call SetColoreCella(9,6,0)
For x = 3 To 10
If aa >= 18 And rp(2) >= 18 And rp(3) >= 18 And rp(4) >= 18 Then Call SetColoreCella((x),RGB(88,171,171),0)
Next
End If
If bb >= 18 And rpp(2) >= 18 And rpp(3) >= 18 And rpp(4) >= 18 Then
V12 = "Ok"
Else
V12 = "-"
End If
If bb >= 18 And rpp(2) >= 18 And rpp(3) >= 18 And rpp(4) >= 18 And aa >= 18 And rp(2) >= 18 And rp(3) >= 18 And rp(4) >= 18 Then
VV = Array(VV,n,SiglaRuota(r2) & p2,bb,rpp(2),Tot4,rpp(3),Tot5,rpp(4),Tot6,Tt2,v12)
Call AddRigaTabella(VV,,,3,,"arial black")
If p1 = p2 Then Call SetColoreCella(2,RGB(252,89,35),0)
Call SetColoreCella(1,RGB(252,89,35),0)
Call SetColoreCella(5,6,0)
Call SetColoreCella(7,6,0)
Call SetColoreCella(9,6,0)
For xx = 3 To 10
If bb >= 18 And rpp(2) >= 18 And rpp(3) >= 18 And rpp(4) >= 18 Then Call SetColoreCella((xx),RGB(88,171,171),0)
Next
End If
If bb >= 18 And rpp(2) >= 18 And rpp(3) >= 18 And rpp(4) >= 18 And aa >= 18 And rp(2) >= 18 And rp(3) >= 18 And rp(4) >= 18 Then
VVV = Array(VVV,"-","Tot_V",aa + bb,rp(2) + rpp(2),Tot1 + Tot4,rp(3) + rpp(3),Tot2 + Tot5,rp(4) + rpp(4),Tot3 + Tot6,Tt3,"-")
Call AddRigaTabella(VVV,,"Right",3,1,"Cambria")
Call SetColoreCella(5,3,0)
Call SetColoreCella(7,3,0)
Call SetColoreCella(9,3,0)
Call SetColoreCella(10,7,5)
End If
If bb >= 18 And rpp(2) >= 18 And rpp(3) >= 18 And rpp(4) >= 18 And aa >= 18 And rp(2) >= 18 And rp(3) >= 18 And rp(4) >= 18 Then
Call AddRigaTabella(T,RGB(167,167,167),,3,5,"Arial Black")
End If
End If
Next
Next
Next
CreaTabella
Scrivi "Tempo di Elaborazione " & TempoTrascorso
End Sub