"Penny" <pe***@spampolice.com> wrote in message
news:42******@funnel.arach.net.au...
: Hi all,
:
: My browser throws this Select Case block back at me pointing out a syntax
: error on the line: 'Case < 251', between the word 'Case' and the '<'
symbol.
:
: ***************************
:
: intWeightTotal = 550
:
: Select Case intWeightTotal
: Case < 251
: ' Do something
: Case < 501
: ' Do something
: Case < 1001
: ' Do something
: Case < 2001
: ' Do something
: Case Else
: ' Do something else
: End Select
:
: **************************
:
: All my other Select Case blocks work fine without the '<' symbol.
:
: I've also tried the line 'Case Is < 251' but same error.
:
: Any ideas?
Try this:
Select Case True
Case intWeightTotal < 251
' Do something
Case intWeightTotal < 501
' Do something
Case intWeightTotal < 1001
' Do something
Case intWeightTotal < 2001
' Do something
Case Else
' Do something else
End Select
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp