Look up Select Case
|
| question is: how long can this IF..THEN statement be?
|
| it is currently 42 lines.
|
Look up Select Case
|
| question is: how long can this IF..THEN statement be?
|
| it is currently 42 lines.
|
Mayayana wrote:
> | | question is: how long can this IF..THEN statement be?
> | | it is > currently 42 lines. |Can you be more specific? I can't find anything in the Select Case or
> Look up Select Case
If...Then...Else documentation that answers the question.
--
Crash
"Patriotism is the last refuge of a scoundrel."
~ Samuel Johnson ~
|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.
| > |
| >
| >
| > .
| >
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Line length | Ildhund | Live Mail | 5 | 15 Aug 2009 |
| Re: DOS DIR and length | +Bob+ | Vista General | 1 | 12 May 2009 |
| Length of lines | clicker | Vista mail | 1 | 19 Feb 2009 |
| gwmi collection length in if statement | Jeroen | PowerShell | 0 | 18 Feb 2009 |
| length of vista | randalel | Vista General | 7 | 07 Nov 2006 |