|
can any one see my program and see if works for you i am trying get this to run right or do any one have a better code
Private Sub cmdallspin_Click()
Dim pic1 As Integer, pic2 As Integer, pic3 As Integer Dim payoff As Currency 'pay to win ' Winnings=winnings
'generate random results pic1 = Int(4 * Rnd + 1) pic2 = Int(4 * Rnd + 1) pic3 = Int(4 * Rnd + 1) 'display icons If pic1 = club Then imgslot1 = imgclub ElseIf pic1 = heart Then imgslot1 = imgheart ElseIf pic1 = diamond Then imgslot1 = imgdiamond ElseIf pic2 = spade Then imgslot1 = imgspade End If
'display icon2 If pic2 = club Then imgslot2.Picture = imgclub ElseIf pic2 = heart Then imgslot2.Picture = imgheart ElseIf pic2 = diamond Then imgslot2.Picture = imgdiamond ElseIf pic2 = spade Then imgslot2.Picture = imgspade End If
'display icon3 If pic3 = club Then imgslot3.Picture = imgclub ElseIf pic3 = heart Then imgslot3.Picture = imgheart ElseIf pic3 = diamond Then imgslot3.Picture = imgdiamond ElseIf pic3 = spade Then imgslot3.Picture = imgspade End If 'check to see if player has won If pic1 = pic2 And pic2 = pic3 Then If pic1 = diamomd Then payoff = 25 msgboxv "You win" End If Else payoff = 0 Beep End If
'compute and display total winnings Winnings = Winnings + payoff 'cmdspin2 lbltotal.Caption = Format(Winnings, "0.00")
|