Re: length of IF..THEN statement in VBS......

M

Mayayana

Look up Select Case

|
| question is: how long can this IF..THEN statement be?
|
| it is currently 42 lines.
|
 

My Computer

D

Dave \Crash\ Dummy

Mayayana wrote:

> | | question is: how long can this IF..THEN statement be?
> | | it is > currently 42 lines. |

> Look up Select Case
Can you be more specific? I can't find anything in the Select Case or
If...Then...Else documentation that answers the question.
--
Crash

"Patriotism is the last refuge of a scoundrel."
~ Samuel Johnson ~
 

My Computer

M

Mayayana

|I wasn't looking for ways of cleaning up the script. sorry if i gave that
| idea. i am looking for the limit of how big an IF..THEN statement can
be,
| espcecially when using the continuation syntax.
|

It just doesn't make sense to do it that way. If...Then
is not designed for that. If that's really what you want to
do then you'll just have to write it and see if it works.

Select Case srvname
Case "a", "b", "c"

Case "d", "e". "f"

End Select


If Select Case doesn't seem ideal then you could
do what Pegasus suggests, or even put them into
an array:

For i = 0 to UBound(ArrayList)
If ArrayList(i) = srvname then
' do something
Exit For
End If
Next

| --
| Thanks,
| Bill
|
|
| "Mayayana" wrote:
|
| > Look up Select Case
| >
| > |
| > | question is: how long can this IF..THEN statement be?
| > |
| > | it is currently 42 lines.
| > |
| >
| >
| > .
| >
 

My Computer

Top