Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Error Message within a Loop Message

rtrgrl78rtrgrl78 Member Posts: 9
Hello,

I'm working a game called 'Craps' for within VB. I have code for 'Loop' which asks the player, how much stake they would like to place:


On Error GoTo localhandler

Do
Stake = InputBox("Amount", "Betting Stake", "0")

Loop While Stake <= 5 Or Stake >= 11

I would like to place within the an 'Error Message' if player tries to enter:

< = less than or equal to 5
> = Greater than or equal to 11

With just a brief message and an 'OK' button.

Many Thanks.

Comments

  • BitByBit_ThorBitByBit_Thor Member Posts: 2,444
    : Hello,
    :
    : I'm working a game called 'Craps' for within VB. I have code for
    : 'Loop' which asks the player, how much stake they would like to
    : place:
    :
    : [code]
    : On Error GoTo localhandler
    :
    : Do
    : Stake = InputBox("Amount", "Betting Stake", "0")
    : [color=blue]If Stake <= 5 Or Stake >= 11 Then
    MsgBox("Bad stake")
    End If[/color]
    : Loop While Stake <= 5 Or Stake >= 11[/code]
    :
    : I would like to place within the an 'Error Message' if player tries
    : to enter:
    :
    : < = less than or equal to 5
    : > = Greater than or equal to 11
    :
    : With just a brief message and an 'OK' button.
    :
    : Many Thanks.
    :

    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
Sign In or Register to comment.