+ Reply to Thread
Results 1 to 2 of 2

Conditional branching in code

  1. #1
    Registered User
    Join Date
    12-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    15

    Conditional branching in code

    I have some code that was written by another member and then I modified to add some other functionality. I need to add one more feature to it but can't quite figure out how. I don't want the page created or the csv file saved it the sItems evaluates to zero. Any help would be appreciated.

    Here is the code that sets the variables for each part number group and calls the code to process the parts:
    Please Login or Register  to view this content.
    Here is the code that processes the order.
    Please Login or Register  to view this content.
    Here is the code that finishes up the process and returns me to the "Summary" page:
    Please Login or Register  to view this content.
    And finally, the part that initializes the variables:
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Conditional branching in code

    I think I understand your question (if not the code itself )

    In situations like this I often use a simple Boolean variable. Set it to false before the start of the decision making process, set it to true when you find you want to wtire out the files and then wrap the file creation codes inside an If xxx = true type If/endif block

    hope this helps your thinking

    Cheers

    Jmac1947

    1. Please consider clicking on the * Add Reputation if you think this post has helped you
    2. Mark your thread as SOLVED when question is resolved

+ 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. Branching Questionnaire
    By kingofbeans in forum Excel General
    Replies: 3
    Last Post: 08-10-2013, 07:42 PM
  2. [SOLVED] Error trapping and branching in a sub routine
    By orly_sm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 04:16 AM
  3. Random Branching
    By 500bloc in forum Excel General
    Replies: 8
    Last Post: 01-28-2012, 05:00 PM
  4. Conditional Formatting Code - Deletes Wrong Conditional Format
    By RSpecianJr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2010, 10:53 AM
  5. [SOLVED] Branching Drop Down Menu
    By tnvis in forum Excel General
    Replies: 1
    Last Post: 10-24-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