Sub Main
Const BA_ = 1
Const CA_ = 2
Const FI_ = 3
Const GE_ = 4
Const MI_ = 5
Const NA_ = 6
Const PA_ = 7
Const RM_ = 8
Const TO_ = 9
Const VE_ = 10
Const NZ_ = 11
Const TT_ = 12
Dim FIn,Es,Es2,Ini,N1,N2,N3,N4,N5,N6,Retnum,Retvinc
Dim Caso,Casi,A,B,C,D,E,F,G,h,Clp,Ind_Me,Ambetto,k,flFig
Dim Amba(1),Ambo(3),Ambo1(3),Posta(1),Poste(2),Ruo(3),Ruo1(2)
FIn = EstrazioneFin
If FIn < 1 Then
MsgBox "Archivio estrazioni non disponibile!",vbCritical
Exit Sub
End If
' --- Input utente ---
Ini = InputBox("Inserisci l'estrazione da cui iniziare",,FIn - 300)
If Ini = "" Or Not IsNumeric(Ini) Or CLng(Ini) < 1 Or CLng(Ini) > FIn Then Exit Sub
Ini = CLng(Ini)
Clp = InputBox("Per quanti colpi vuoi giocare?",,13)
If Clp = "" Or Not IsNumeric(Clp) Or CInt(Clp) < 1 Then Clp = 13
Clp = CInt(Clp)
Ind_Me = InputBox("Inserisci l'indice mensile da cercare (es. 1)",,1)
If Ind_Me = "" Or Not IsNumeric(Ind_Me) Then Ind_Me = 13
Ind_Me = CInt(Ind_Me)
' --- Impostazioni giocate ---
Posta(1) = 1
Poste(2) = 1
Ruo(1) = MI_ : Ruo(2) = NZ_ : Ruo(3) = TT_
Casi = 0
' --- Ciclo principale ---
For Es = Ini To FIn
If IndiceMensile(Es) = Ind_Me Then
Messaggio Es
AvanzamentoElab Ini,FIn,Es
' --- Estrai numeri con controllo Null ---
Dim tA,tB,tC,tD,tE,tf,tg,th
tA = Estratto(Es,MI_,1) ' Milano, 2° estratto
tB = Estratto(Es,PA_,4) ' Milano, 3° estratto
tC = Estratto(Es,BA_,4) ' Roma, 3° estratto
tD = Estratto(Es,VE_,5) ' Palermo, 2° estratto
tE = Estratto(Es,MI_,3) ' Milano, 3° estratto.
tf = Estratto(Es,TO_,5) ' Torino , 5° estratto
tg = Estratto(Es,MI_,1) ' Milano, 1° estratto
th = Estratto(Es,MI_,5) ' Milano, 5° estratto.
If IsNull(tA) Or IsNull(tB) Or IsNull(tC) Or IsNull(tD) Or IsNull(tE) Or IsNull(tf) Or IsNull(tg) Or IsNull(th) Then
Continue
End If
A = CInt(tA)
B = CInt(tB)
C = CInt(tC)
D = CInt(tD)
E = CInt(tE)
F = CInt(tf)
G = CInt(tg)
h = CInt(th)
Scrivi " Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)
Scrivi ""
N1 = Fuori90(A + 18)
N2 = Fuori90(A + 57)
(esempio test)
questo è un esempio
devo inserire la ricerca della prima estrazione del tipo Gennaio/Febbraio
Marzo/Aprile
ecc...
domanda esiste una funzione
grazie
Const BA_ = 1
Const CA_ = 2
Const FI_ = 3
Const GE_ = 4
Const MI_ = 5
Const NA_ = 6
Const PA_ = 7
Const RM_ = 8
Const TO_ = 9
Const VE_ = 10
Const NZ_ = 11
Const TT_ = 12
Dim FIn,Es,Es2,Ini,N1,N2,N3,N4,N5,N6,Retnum,Retvinc
Dim Caso,Casi,A,B,C,D,E,F,G,h,Clp,Ind_Me,Ambetto,k,flFig
Dim Amba(1),Ambo(3),Ambo1(3),Posta(1),Poste(2),Ruo(3),Ruo1(2)
FIn = EstrazioneFin
If FIn < 1 Then
MsgBox "Archivio estrazioni non disponibile!",vbCritical
Exit Sub
End If
' --- Input utente ---
Ini = InputBox("Inserisci l'estrazione da cui iniziare",,FIn - 300)
If Ini = "" Or Not IsNumeric(Ini) Or CLng(Ini) < 1 Or CLng(Ini) > FIn Then Exit Sub
Ini = CLng(Ini)
Clp = InputBox("Per quanti colpi vuoi giocare?",,13)
If Clp = "" Or Not IsNumeric(Clp) Or CInt(Clp) < 1 Then Clp = 13
Clp = CInt(Clp)
Ind_Me = InputBox("Inserisci l'indice mensile da cercare (es. 1)",,1)
If Ind_Me = "" Or Not IsNumeric(Ind_Me) Then Ind_Me = 13
Ind_Me = CInt(Ind_Me)
' --- Impostazioni giocate ---
Posta(1) = 1
Poste(2) = 1
Ruo(1) = MI_ : Ruo(2) = NZ_ : Ruo(3) = TT_
Casi = 0
' --- Ciclo principale ---
For Es = Ini To FIn
If IndiceMensile(Es) = Ind_Me Then
Messaggio Es
AvanzamentoElab Ini,FIn,Es
' --- Estrai numeri con controllo Null ---
Dim tA,tB,tC,tD,tE,tf,tg,th
tA = Estratto(Es,MI_,1) ' Milano, 2° estratto
tB = Estratto(Es,PA_,4) ' Milano, 3° estratto
tC = Estratto(Es,BA_,4) ' Roma, 3° estratto
tD = Estratto(Es,VE_,5) ' Palermo, 2° estratto
tE = Estratto(Es,MI_,3) ' Milano, 3° estratto.
tf = Estratto(Es,TO_,5) ' Torino , 5° estratto
tg = Estratto(Es,MI_,1) ' Milano, 1° estratto
th = Estratto(Es,MI_,5) ' Milano, 5° estratto.
If IsNull(tA) Or IsNull(tB) Or IsNull(tC) Or IsNull(tD) Or IsNull(tE) Or IsNull(tf) Or IsNull(tg) Or IsNull(th) Then
Continue
End If
A = CInt(tA)
B = CInt(tB)
C = CInt(tC)
D = CInt(tD)
E = CInt(tE)
F = CInt(tf)
G = CInt(tg)
h = CInt(th)
Scrivi " Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)
Scrivi ""
N1 = Fuori90(A + 18)
N2 = Fuori90(A + 57)
(esempio test)
questo è un esempio
devo inserire la ricerca della prima estrazione del tipo Gennaio/Febbraio
Marzo/Aprile
ecc...
domanda esiste una funzione
grazie