+ Reply to Thread
Results 1 to 4 of 4

"If" within the range of "If / Else" space

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    14

    "If" within the range of "If / Else" space

    Hello,
    I have a code which tries to do the following

    1. If condition1 is met, proceed.
    <code that does something>
    2. Prompt: Yes or no. If yes, continue doing 1). Else stop.
    <code that continues doing 1)>
    3. End if

    The problem is, I get an If/End within another If/End, which seems to confuse excel. Please see the middle If/End as inactivated ('code). Have a look:

    ps. I know my coding is messy but I'm still learning and so far it works beautifully

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by rthell; 09-30-2014 at 09:34 AM.

  2. #2
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: "If" within the range of "If / Else" space

    your if/else/end if don't match - you commented out one of your IFs and left the ELSE in there
    * it would be easier if you could upload your worksheet

  3. #3
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: "If" within the range of "If / Else" space

    Sorry that's just me being sloppy when posting here. Please check the formula now. Are you saying it should actually work now?

  4. #4
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: "If" within the range of "If / Else" space

    * as i mentioned before, it would be helpful if you could upload an example
    I'm trying to recreate it every time - and I'm sure its not correct....

    That being said, I am currently stopping on the EnvelopeVisible
    but made notes from your comments on the IF/ELSE statements
    comments are in flower boxes '***********

    hope this helps a little...
    Attached Files Attached Files

+ 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] If Not ActiveSheet.Range("A1").Value Like "apple" Then MsgBox "Error"
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-18-2014, 02:16 PM
  2. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  3. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. use variable in Workbooks("book1").Worksheets("sheet1").Range("a1"
    By Luc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2005, 04:05 PM

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