E come di grazia?
codice:Private Sub Form_Load() Private Sub Form_Load() Dim sq$(10), st$(5), sqf$(5), risc(5), risf(5), pu(40) Dim punti() As Integer Dim Classifica(1000) As Integer Dim Stringa As String Dim Numerosquadre As Integer Dim ni As Integer pun = 0 peso0 = 1500 peso1 = 1500 peso2 = 1500 peso3 = 1500 peso4 = 1500 peso5 = 1500 peso6 = 1500 peso7 = 1500 peso8 = 1500 peso9 = 1500 vin0 = 0 vinfc0 = 0 v = 0 Static c As Integer c = 0 somma0 = 0 On Error GoTo NotExist 'Se non viene aperto (errore) in file non esiste Close #1 Open "Austria.txt" For Input As #1 fileexist = True 'Se viene aperto il file esiste If fileexist = True Then GoTo 10 NotExist: fileexist = False If fileexist = False Then GoTo 100 10 For j = 0 To 9 Input #1, sq$(j) Text1(j) = sq$(j) Next j Close #1 For k = 1 To 40 c = c + 1 Open "Austriaris" & Trim(CStr(c)) & ".TXT" For Input As #1 fileexist = True 'Se viene aperto il file esiste If fileexist = True Then GoTo 20 NotExist2: fileexist = False If fileexist = False Then GoTo 100 20 For x = 0 To 4 Input #1, st$(x), sqf$(x), risc(x), risf(x) Next x Close #1 For j = 0 To 9 Text2(j) = c Next For x = 0 To 4 If Text1(0) = st$(x) And risc(x) > risf(x) Then pu(c) = pun + 3: somma0 = somma0 + pu(c): Text3(0) = somma0: vin0 = vin0 + 1 If Text1(0) = st$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma0 = somma0 + pu(c): Text3(0) = somma0 If Text1(0) = sqf$(x) And risc(x) > risf(x) Then pu(c) = pun + 0: somma0 = somma0 + pu(c): Text3(0) = somma0 If Text1(0) = sqf$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma0 = somma0 + pu(c): Text3(0) = somma0 If Text1(0) = sqf$(x) And risc(x) < risf(x) Then pu(c) = pun + 3: somma0 = somma0 + pu(c): Text3(0) = somma0: vinfc0 = vinfc0 + 1 If Text1(0) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 And risf(x) < 2 Then peso0 = peso0 + 25 If Text1(0) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso0 = peso0 + 50 If Text1(0) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso0 = peso0 + 100 If Text1(0) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso0 = peso0 + 150 If Text1(0) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso0 = peso0 + 250 If Text1(0) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso0 = peso0 + 35 If Text1(0) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso0 = peso0 + 50 If Text1(0) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso0 = peso0 + 115 If Text1(0) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso0 = peso0 + 175 If Text1(0) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso0 = peso0 + 300 If Text1(0) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso0 = peso0 - 35 If Text1(0) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso0 = peso0 - 65 If Text1(0) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso0 = peso0 - 115 If Text1(0) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso0 = peso0 - 175 If Text1(0) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso0 = peso0 - 300 If Text1(0) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 Then peso0 = peso0 - 25 If Text1(0) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso0 = peso0 - 50 If Text1(0) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso0 = peso0 - 100 If Text1(0) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso0 = peso0 - 150 If Text1(0) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso0 = peso0 - 250 If Text1(1) = st$(x) And risc(x) > risf(x) Then pu(c) = pun + 3: somma1 = somma1 + pu(c): Text3(1) = somma1: vin2 = vin2 + 1 If Text1(1) = st$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma1 = somma1 + pu(c): Text3(1) = somma1 If Text1(1) = sqf$(x) And risc(x) > risf(x) Then pu(c) = pun + 0: somma1 = somma1 + pu(c): Text3(1) = somma1 If Text1(1) = sqf$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma1 = somma1 + pu(c): Text3(1) = somma1 If Text1(1) = sqf$(x) And risc(x) < risf(x) Then pu(c) = pun + 3: somma1 = somma1 + pu(c): Text3(1) = somma1: vin3 = vin3 + 1 If Text1(1) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 Then peso0 = peso0 + 25 If Text1(1) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso0 = peso0 + 50 If Text1(1) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso0 = peso0 + 100 If Text1(1) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso0 = peso0 + 150 If Text1(1) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso0 = peso0 + 250 If Text1(1) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso1 = peso1 + 35 If Text1(1) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso1 = peso1 + 50 If Text1(1) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso1 = peso1 + 115 If Text1(1) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso1 = peso1 + 175 If Text1(1) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso1 = peso1 + 300 If Text1(1) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso1 = peso1 - 35 If Text1(1) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso1 = peso1 - 65 If Text1(1) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso1 = peso1 - 115 If Text1(1) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso1 = peso1 - 175 If Text1(1) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso1 = peso1 - 300 If Text1(1) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 Then peso1 = peso1 - 25 If Text1(1) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso1 = peso1 - 50 If Text1(1) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso1 = peso1 - 100 If Text1(1) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso1 = peso1 - 150 If Text1(1) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso1 = peso1 - 250 If Text1(2) = st$(x) And risc(x) > risf(x) Then pu(c) = pun + 3: somma2 = somma2 + pu(c): Text3(2) = somma2: vin4 = vin4 + 1 If Text1(2) = st$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma2 = somma2 + pu(c): Text3(2) = somma2 If Text1(2) = sqf$(x) And risc(x) > risf(x) Then pu(c) = pun + 0: somma2 = somma2 + pu(c): Text3(2) = somma2 If Text1(2) = sqf$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma2 = somma2 + pu(c): Text3(2) = somma2 If Text1(2) = sqf$(x) And risc(x) < risf(x) Then pu(c) = pun + 3: somma2 = somma2 + pu(c): Text3(2) = somma2: vinf4 = vinf4 + 1 If Text1(2) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso2 = peso2 + 35 If Text1(2) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso2 = peso2 + 50 If Text1(2) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso2 = peso2 + 115 If Text1(2) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso2 = peso2 + 175 If Text1(2) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso2 = peso2 + 300 If Text1(2) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso2 = peso2 - 35 If Text1(2) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso2 = peso2 - 65 If Text1(2) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso2 = peso2 - 115 If Text1(2) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso2 = peso2 - 175 If Text1(2) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso2 = peso2 - 300 If Text1(2) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 Then peso2 = peso2 - 25 If Text1(2) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso2 = peso2 - 50 If Text1(2) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso2 = peso2 - 100 If Text1(2) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso2 = peso2 - 150 If Text1(2) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso2 = peso2 - 250 If Text1(2) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 Then peso2 = peso2 + 25 If Text1(2) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso2 = peso2 + 50 If Text1(2) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso2 = peso2 + 100 If Text1(2) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso2 = peso2 + 150 If Text1(2) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso2 = peso2 + 250 If Text1(3) = st$(x) And risc(x) > risf(x) Then pu(c) = pun + 3: somma3 = somma3 + pu(c): Text3(3) = somma3: vin5 = vin5 + 1 If Text1(3) = st$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma3 = somma3 + pu(c): Text3(3) = somma3 If Text1(3) = sqf$(x) And risc(x) > risf(x) Then pu(c) = pun + 0: somma3 = somma3 + pu(c): Text3(3) = somma3 If Text1(3) = sqf$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma3 = somma3 + pu(c): Text3(3) = somma3 If Text1(3) = sqf$(x) And risc(x) < risf(x) Then pu(c) = pun + 3: somma3 = somma3 + pu(c): Text3(3) = somma3: vinf5 = vinf5 + 1 If Text1(3) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso3 = peso3 + 35 If Text1(3) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso3 = peso3 + 50 If Text1(3) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso3 = peso3 + 115 If Text1(3) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso3 = peso3 + 175 If Text1(3) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso3 = peso3 + 300 If Text1(3) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 Then peso3 = peso3 - 35 If Text1(3) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso3 = peso3 - 65 If Text1(3) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso3 = peso3 - 115 If Text1(3) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso3 = peso3 - 175 If Text1(3) = st$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso3 = peso3 - 300 If Text1(3) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 Then peso3 = peso3 - 25 If Text1(3) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso3 = peso3 - 50 If Text1(3) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso3 = peso3 - 100 If Text1(3) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso3 = peso3 - 150 If Text1(3) = sqf$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso3 = peso3 - 250 If Text1(3) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 1 Then peso3 = peso3 + 25 If Text1(3) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 2 Then peso3 = peso3 + 50 If Text1(3) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 3 Then peso3 = peso3 + 100 If Text1(3) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 4 Then peso3 = peso3 + 150 If Text1(3) = st$(x) And risc(x) > risf(x) And risc(x) > risf(x) + 5 Then peso3 = peso3 + 250 If Text1(4) = st$(x) And risc(x) > risf(x) Then pu(c) = pun + 3: somma4 = somma4 + pu(c): Text3(4) = somma4: vin6 = vin6 + 1 If Text1(4) = st$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma4 = somma4 + pu(c): Text3(4) = somma4 If Text1(4) = sqf$(x) And risc(x) > risf(x) Then pu(c) = pun + 0: somma4 = somma4 + pu(c): Text3(4) = somma4 If Text1(4) = sqf$(x) And risc(x) = risf(x) Then pu(c) = pun + 1: somma4 = somma4 + pu(c): Text3(4) = somma4 If Text1(4) = sqf$(x) And risc(x) < risf(x) Then pu(c) = pun + 3: somma4 = somma4 + pu(c): Text3(4) = somma4: vinf6 = vinf6 + 1 If Text1(4) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 1 And risf(x) < 2 Then peso4 = peso4 + 35 If Text1(4) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 2 Then peso4 = peso4 + 50 If Text1(4) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 3 Then peso4 = peso4 + 115 If Text1(4) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 4 Then peso4 = peso4 + 175 If Text1(4) = sqf$(x) And risc(x) < risf(x) And risc(x) < risf(x) + 5 Then peso4 = peso4 + 300 continua.... end sub
codice allegato un po' lunghetto!
ringrazio per una tua cortese risposta

Rispondi quotando