Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions
This is the forum to discuss the Wrox book VBScript Programmer's Reference, 3rd Edition by Adrian Kingsley-Hughes, Kathie Kingsley-Hughes, Daniel Read; ISBN: 9780470168080
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 24th, 2006, 01:07 PM
Registered User
Join Date: Sep 2006
Location: LONDON, , United Kingdom.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Do....Loop While loop

Hi, i am new to vbscript and brought the vbscript book.
I just needed to know why the following code does not work prperly.
It's on page 14.
Dim Greeting
Dim YourName
Dim TryAgain


   TryAgain = "No"

      YourName = InputBox("Please enter your name:")

      If YourName = "" Then
      MsgBox "You must enter your name to continue."
   TryAgain = "Yes"
      Greeting = "Hello, " & YourName & ", great to meet you."
 End If

Loop While TryAgian = "Yes"

MsgBox Greeting


The code does not seem to start again from the begining when i dont enter any input. I get the first MsgBox and then when i click "ok" i get a second MsgBox with no message. When i click "ok" it just closes and nothing else seems to happen.

Can anyone tell me why this is?
When i do

Reply With Quote
  #2 (permalink)  
Old February 4th, 2008, 03:51 PM
Registered User
Join Date: Feb 2008
Location: New York, NY, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to zimi0 Send a message via MSN to zimi0 Send a message via Yahoo to zimi0

Your loop condition "TryAgian" is spelt incorrectly. should be TryAgain

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with for-each loop athanatos XSLT 0 April 10th, 2006 07:20 PM
Do Until loop with IF crmpicco Classic ASP Databases 2 June 15th, 2005 05:35 PM
For....Loop kliu9 Excel VBA 5 February 10th, 2005 06:43 AM
Do Loop junemo Beginning PHP 8 July 28th, 2004 02:58 AM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM

All times are GMT -4. The time now is 11:51 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.