| Ciao, allora, in effetti Dim Fileout è da lasciare. In ogni caso qui sotto c'è lo script con l'output diretto e no su file testo. Sarà un po' più lento....Aggiusta anche i FormatSpace al posto dei FormattaStringa e credo funzioni. Scusami ma non avendo L8 posso solo procedere così :-) ' Storici evento sortita di almeno uno degl ambi più ritardatari su ruota fissa (Cinzia)23-12-2017 ' modificato da GAM - 19-01-2019 - FUNZIONA con SPAZIOMETRIA
Sub Main() Dim n(2),ru(1),mt(4005,5) Dim nrP,eini,efin,r,c,ce,riga,con,cs,es,i,j,fr,x,sr
nrP = 3'InputBox("Quante Posizioni? ",,3)
eini = 9260 efin = EstrazioneFin
r = 1 ''InputBox("Su quale ruota vuoi fare la ricerca? ",,1) sr= SiglaRuota(r)
ru(1) = r
For es = eini To efin
c = 0 For i = 1 To 89 For j = i + 1 To 90 Messaggio(es & " - " & r & " - " & c) n(1) = i n(2) = j fr = SerieFreq(es,es,n,ru,2) c = c + 1 mt(c,1) = c mt(c,2) = es mt(c,3) = SiglaRuota(r) & " " & Format2(n(1)) & "." & Format2(n(2)) mt(c,4) = SerieRitardoTurbo(es - 5730,es - 1,n,ru,2) ' sostituire con funzione di L8 togliere se si usa L8 mt(c,5) = fr Next Next OrdinaMatrice mt,- 1,4 ce = 0 riga = FormattaStringa(mt(1,2),"0000") & " " & DataEstrazione(mt(1,2)) For x = 1 To nrP If mt(x,5) > 0 Then ce = ce + 1 riga = riga + " " & mt(x,3) & " STO " & FormattaStringa(mt(x,4),"0000") Else riga = riga + " " & mt(x,3) & " ATT " & FormattaStringa(mt(x,4),"0000") End If Next riga = riga + " " & mt(nrP + 1,3) & " Rit " & FormattaStringa(mt(nrP + 1,4),"0000") & " " & mt(nrP + 2,3) & " Rit " & FormattaStringa(mt(nrP + 2,4),"0000") con = con + 1 If ce > 0 Then cs = cs + 1 If mt(nrP,4) <> mt(nrP + 1,4) Then scrivi riga & " RP " & FormattaStringa(con,"0000"),0 ' ELIMINA l'eventualità di isoritardi Else scrivi riga & " RP Iso" & FormattaStringa(con,"0000"),0 ' ELIMINA l'eventualità di isoritardi End If riga = "" con = 0 Else If es = efin Then 'scrivi riga & " RP " & FormattaStringa(con,"0000") & " ***" ' eliminare con l'apice a inizio riga per avere solo la sintesi della ricerca riga = "" Else 'scrivi riga ' eliminare con l'apice a inizio riga per avere solo la sintesi della ricerca riga = "" End If End If
Next
End Sub
|