questo codice funziona (serve un bottone che lo fa partire più una casella di testo mulitline che si chiama "combinazioni" e una che si chiama "aaa"
Pur non essendoci valori altissimi quando arrivo alla combinazione 999951 sio blocca tutto perchè?
Graziecodice:Public Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer Dim e As Integer Dim f As Integer Dim g As Long Dim h As Integer Dim i As Integer a = 1 b = 1 c = 1 d = 1 e = 1 f = 1 g = 1 h = 6 i = 0 GoTo conta conta: a = a + 1 If a = 10 Then a = 1 b = b + 1 If b = 10 Then b = 1 c = c + 1 If c = 10 Then c = 1 d = d + 1 If d = 10 Then d = 1 e = e + 1 If e = 10 Then e = 1 f = f + 1 End If End If End If End If End If a1.Text = a b1.Text = b c1.Text = c d1.Text = d e1.Text = e f1.Text = f h = a + b + c + d + e + f If h = 54 Then GoTo fine GoTo controlla controlla: g = 0 g = a * b * c * d * e * f If g = 216 Then combinazioni.Text = combinazioni.Text & a & " " & b & " " & c & " " & d & " " & e & " " & f & vbCrLf GoTo conta Else GoTo conta End If fine: aaa.Text = "fine" End Sub
ciao