Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

while

Status
Not open for further replies.

cocktailsk

Programmer
Mar 2, 2009
1
SK
I have this script:

a = "1"
While a < 2
"script"
a = a + 1
Wend

but if I trie this:

a = "1"
b = "2"
While a < b
"script"
a = a + 1
Wend

then it is not working. can anybody help me to get this fixes?
 
Why using strings when you clearly want numeric ?
Code:
a = 1
b = 2
While a < b
  "script"
  a = a + 1
Wend

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Or why use While/Wend which is only in VBScript for compatibility with old VB3 code? The more flexible Do/Loop was introduced long ago to replace it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top