Windows Vista Forums

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

  1. #1


    Mayayana Guest

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

    Look up Select Case

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



      My System SpecsSystem Spec

  2. #2


    Dave \Crash\ Dummy Guest

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

    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 System SpecsSystem Spec

  3. #3


    Mayayana Guest

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

    |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 System SpecsSystem Spec

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

Similar Threads
Thread Forum
Line length
Does anyone know where the maximum line length of 132 characters in the mail sending format settings comes from, and why the limit is imposed in...
Live Mail
Re: DOS DIR and length
On Tue, 12 May 2009 12:19:23 -0400, Tim Slattery <Slattery_T@xxxxxx> wrote: You can approximate it by calculating against the file size...
Vista General
Length of lines
How do I set the number of characters (line length), so message doesn't appear garbled to receiver? I know 60 - 65 is kind of the accepted rule for...
Vista mail
gwmi collection length in if statement
Hi all, I have a script that looks into win32_NTLogEvent for a specific error on multiple servers. However, it doesn't validate properly. The...
PowerShell
sort filenames by length?
I'm having a problem with Foldershare syncing files, saying there is a file that is too long to sync. But it doesn't tell me which file. is there...
General Discussion
Vista Says WEP Key Is Wrong Length
I have Vista on my laptop. I need to connect to a wireless network which has WEP encryption with a 6 character pass phrase. Every time I...
Vista networking & sharing
length of vista
my ver. of vista is over 2500 mb long.I cannot find a cd that long an my dvd's can' t be read
Vista General