Re: "Case" Question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Shapper wrote:
Hello,

I have a "Select Case MyVar" in which I define the values of an Array according to the value of MyVar.

I need to use the Array Values in a Loop after End Select.
It seems the Array is deleted on End Select.

How can I make it available for my loop?

Thanks,
Miguel


Can't really tell without seeing the code, will only be speculating on an answer. Please post sample of Select Case and where the array is declared if this doesn't solve it...but if the array's declared inside the Select Case, it will only be available there, according to scoping rules. If that's the problem, move the declaration out of the Select Case (and For loop).


--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
.



Relevant Pages

  • Re: vector addElement
    ... What happens is that you add the *same* array to the Vector multiple ... and you update that array in your loop. ... Try instead to move the declaration of row_container inside the while-loop. ...
    (comp.lang.java.programmer)
  • Re: vector addElement
    ... I add the values into it in a loop. ... What happens is that you add the *same* array to the Vector multiple ... Try instead to move the declaration of row_container inside the while-loop. ...
    (comp.lang.java.programmer)
  • Re: "Case" Question
    ... After it use it inside my Loop. ... Sometimes the elephant eats you. ... > I have a "Select Case MyVar" in which I define the values of an Array> according to the value of MyVar. ...
    (microsoft.public.dotnet.framework.aspnet)
  • array of pairs
    ... I would like to declare and assign an array of pairs then loop on it ... for pair in $myvar ... echo $1 $2 ...
    (comp.unix.shell)
  • Re: Test if a variable is given as array?
    ... Chip Pearson ... Microsoft Most Valuable Professional ... The function will work with any type of array with any ... MyVar = Array ...
    (microsoft.public.excel.programming)