I think it'll make things more readable. The trick is
Select Case True
...
End Select
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Josh G" <[EMAIL PROTECTED]>
Subject: Re: Lost in Time: If ... then
: ack, sorry, a select would not be the best for this one ;-)
:
: -Josh
: --
: And can you tell me doctor why I still can't get to sleep?
: And why the channel 7 chopper chills me to my feet?
: And what's this rash that comes and goes, can you tell me what it means?
: God help me, I was only 19
:
:
: ----- Original Message -----
: From: "Josh G" <[EMAIL PROTECTED]>
: To: "ActiveServerPages" <[EMAIL PROTECTED]>
: Sent: Wednesday, October 02, 2002 5:10 PM
: Subject: Re: Lost in Time: If ... then
:
:
: > there's your problem - in vb, you don't use else if, you need elseif.
else
: > if is valid code, so you won't syntax error out, but it means something
: > different.
: >
: > if Coverday < 0 then
: > bgcday="red" and days0=days0+1
: > elseif CoverDay > 0 and CoverDay < 45 then
: > bgcday="#2068c0"
: > days045=days045+1
: > elseif CoverDay >= 45 and CoverDay =< 60 then
: > bgcday="green"
: > days4560=days4560+1
: > elseif CoverDay > 60 then
: > bgcday="yellow"
: > days60=days60+1
: > end if
: >
: > Your code may work, but you would need 4(?) "end if"s at the end, and
it's
: > _very_ hard to read. In this case a select would have been a better
idea.
: >
: > -Josh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]