Egregi/gentili partecipanti al forum,
ho una domanda importantissima da rivolgerVi.
Dovrei modificare questo codice:
codice:
Sub Procedura_spin()
' :: Macro Designed, scripted, developed By Luca - luca3dsurfing02@libero.it::
'In caso di 0 gettoni ne agiunge altri
If Range("b2") < 1 Then
MsgBox (":: Devi inserire altri gettoni ::")
Range("b2") = Range("b1")
End If
'SENTENZA:
' Ogni volta che si preme il Pulsante Spin viene degradato un gettone
Range("b2") = Range("b2") - 1
'SENTENZA:
' metti nelle celle i tre valori casuali
For counter = 0 To 100
a = Int(7 * Rnd + 1)
Range("c5") = a
b = Int(7 * Rnd + 1)
Range("d5") = b
c = Int(7 * Rnd + 1)
Range("e5") = c
Next
For counter = 0 To 200
b = Int(7 * Rnd + 1)
Range("d5") = b
c = Int(7 * Rnd + 1)
Range("e5") = c
Next
For counter = 0 To 300
c = Int(7 * Rnd + 1)
Range("e5") = c
Next
':: ecco le regole del gioco ::
If a = b And b = c And c = 7 Then
MsgBox (":: You won ::")
Range("b2") = Range("b2") + 100
End If
If a = b And b = c And c <> 7 Then
MsgBox (":: hai guadagnato 25 punti ::")
Range("b2") = Range("b2") + 25
End If
If a = 1 And b = 2 And c = 3 Then
MsgBox (":: Hai guadagnato 10 punti ::")
Range("b2") = Range("b2") + 10
End If
If a = 3 And b = 2 And c = 1 Then
MsgBox (":: Hai guadagnato 5 punti ::")
Range("b2") = Range("b2") + 5
End If
Questo è il codice VBA che come avrete capito realizza un semplicissimo videopoker su excel.
Lo devo modificare in modo che , importando da WORD i segni delle carte (picche, cuori etc...) girino anche quelli oltre ai numeri e che analogamente ai numeri vengano assegnati i punti.
Purtroppo io ssono un novizio e vorrei un vostro parere.
Ringrazio anticipatamente fin d'ora tutti per l'aiuto.
Luca.