Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a VB Expert!

Join 244,220 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,413 people online right now. Registration is fast and FREE... Join Now!




Inputbox/Do Loop Problem

 
Reply to this topicStart new topic

Inputbox/Do Loop Problem

dgsub
7 Jan, 2009 - 03:58 AM
Post #1

New D.I.C Head
*

Joined: 7 Jan, 2009
Posts: 4

Can somebody tell what is wrong with this code?

CODE
    If RunningTotal = 1 Then
        RunningTotal = 0
        Do
            Descision = InputBox("Do you want your ace to equal 11? Yes or No")
            If Decscision = "Yes" Then RunningTotal = 11
            If Descision = "No" Then RunningTotal = 1
        Loop Until RunningTotal = 1 Or RunningTotal = 11
    
    End If


The inputbox does not accept Yes as a valid answer, so the inputbox is displayed again.

The purpose of this code is that it asks the player to decide wether they want their ace to equal 11 or not.(it's for a blackjack program)#

Thanking you in advance.


User is offlineProfile CardPM
+Quote Post


dgsub
RE: Inputbox/Do Loop Problem
7 Jan, 2009 - 04:24 AM
Post #2

New D.I.C Head
*

Joined: 7 Jan, 2009
Posts: 4

Sorry for wasting everyone's time it's only a mistyping problem. I feel suitably idiotic now.
User is offlineProfile CardPM
+Quote Post

sam_benne
RE: Inputbox/Do Loop Problem
7 Jan, 2009 - 09:58 AM
Post #3

D.I.C Addict
Group Icon

Joined: 16 Jan, 2008
Posts: 512



Thanked: 4 times
Dream Kudos: 400
My Contributions
What you could do is convert the string to lower letters eg Y = y. So that you can type Yes or yes and it would be the same. Just a suggestion.
User is offlineProfile CardPM
+Quote Post

Nikhil_07n
RE: Inputbox/Do Loop Problem
9 Jan, 2009 - 02:29 AM
Post #4

Payback Time!!!
Group Icon

Joined: 9 Jan, 2009
Posts: 1,621



Thanked: 12 times
Dream Kudos: 1200
My Contributions
QUOTE(sam_benne @ 7 Jan, 2009 - 09:58 AM) *

What you could do is convert the string to lower letters eg Y = y. So that you can type Yes or yes and it would be the same. Just a suggestion.



+1
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 08:33AM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month