+ Reply to Thread
Results 1 to 3 of 3

Nested Case statements... I broke it!

  1. #1
    Registered User
    Join Date
    04-01-2009
    Location
    WashDC
    MS-Off Ver
    Excel 2003
    Posts
    84

    Nested Case statements... I broke it!

    This worked before, and then I tried to clean it up by changing it to nested case statements, and now it's broken. I can't tell if I've simply left EnableEvents False or something like that, though I've tried to fix that. It gets to the 1st and 2nd MsgBox, but never appears to enter the case statement. It may be that I did something strange to Excel, I'm very new to VBA and macros. Thanks any help! The old working code is TempFunc below.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Nested Case statements... I broke it!

    How is it 'broken'?

    Are you getting errors or is the code not doing what it's supposed to do?

    If it's the latter try setting a breakpoint at the start of the code (F9) and then step through (F9) to see what's happening.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-01-2009
    Location
    WashDC
    MS-Off Ver
    Excel 2003
    Posts
    84

    Re: Nested Case statements... I broke it!

    Oops, I had moved my If statement condition over to my case statement incorrectly. Sorry. The beginning of the case statement should have looked something like this:

    Please Login or Register  to view this content.
    For the record, it simply never executed the case statement. No errors or anything. Thanks for your reply!

    K

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Nested if statements containing multiple and statements
    By John M. in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-22-2014, 11:48 PM
  2. questions with if statements and nested if statements
    By Pat Excel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-03-2013, 01:41 PM
  3. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  4. Nested If statements / logic statements
    By Brainless_09 in forum Excel General
    Replies: 3
    Last Post: 06-17-2009, 02:59 PM
  5. Replies: 12
    Last Post: 05-15-2009, 08:38 AM

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