+ Reply to Thread
Results 1 to 3 of 3

Using a loop with Select Case

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Using a loop with Select Case

    I am trying to figure out how to run the i loop under Select Case. I need the loop because the list of reference countries is a dynamic named range (capped at 17) and each value is named Risk_Curve_Ex with a number after it. I get a compile error "Statements and labels invalid between Select Case and first Case."

    An help or suggestions on how to rewrite are greatly appreciated.

    Please Login or Register  to view this content.
    Last edited by greglittle; 10-25-2012 at 04:13 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Using a loop with Select Case

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-20-2012
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Using a loop with Select Case

    No, I didn't find a solution to this issue. Apparently you can't do that. I ended up just creating an array that got filled through a loop, and then listing out every case per the example below:

    Please Login or Register  to view this content.
    Last edited by greglittle; 10-26-2012 at 10:51 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1