+ Reply to Thread
Results 1 to 11 of 11

Combining several small macros into one large one AND Conditional/Sorting Macro Issues

  1. #1
    Registered User
    Join Date
    09-29-2014
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    45

    Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    Macro Help.xlsm

    Hi,

    Hopefully, this will be my last time bother the board with the project. So, I create several small macro each executing a specific task (i.e. formatting, applying conditionals based on a formula, sorting, etc.). I want to combine them into one large macro. I tried to 'call' the small ones into a large one, but it didn't work. Then, I tried to copy past all the language into a new module (removing all the subs and ends), but that didn't work.

    Each small macro works well, except the sort (which I can't figure out why, since it is such a simple sort and the VBA was created with start, record steps, stop), when I run them one at a time. Also, is it not possible to use a VBA for sorting and conditional formatting that uses a formula? Yet, i am sure the answer is just me.

    Either way, I've attached a sample with raw data, what is should look & my errors.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    So looking through your code, it seems your calls are linked to nothing in these workbooks.

    Please Login or Register  to view this content.
    for example has no sub procedure called TicklerAssignment so the code breaks. Is this just a bad example your posted or is this part of your actual problem?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    09-29-2014
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    45

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    I think, not sure, the issue you are referring to is the sample attached. Seems you may not be able to see all the Macro. So, I added more tabs/worksheet with the VBA language for each mini macro and ones for my two attempts at combining the mini macros into a big one. In neither attempt, did I receive a code breaks error. I did include screen prints of the error I did get on the Error tab/worksheet of the attache workbook.

  4. #4
    Registered User
    Join Date
    09-29-2014
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    45

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    Macro Help.xlsm Here's the revised XLSM

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    So what do you need exactly? It seems you just need to carefully merge the procedures?

    Where do you need help precisely?

  6. #6
    Registered User
    Join Date
    09-29-2014
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    45

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    How do I merge it? All my attempts have failed. What am in missing that is causing the errors (on the error worksheet) to pop up? Additionally, when attempting to create a simple sort (1st by m, then by I, then B & last C) macro (which I am doing by hitting record in the developer tab executing the steps and hitting stop), it won't work. Do I need to use some sort of formula or exclude it from the macro altogether as it cannot be done? When executing the steps to create the macro, I can see the proper results. Yet, not so much when I run the macro.

  7. #7
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    Are you familiar with how to walk through code?

    http://www.cpearson.com/excel/DebuggingVBA.aspx

  8. #8
    Registered User
    Join Date
    09-29-2014
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    45

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    I clicked the link provided, but none of the header matched the issue I am having. I am pretty new at this, this my 1st macro. It could be I just don't understand it, which is why I came here.

  9. #9
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    Read the entire article I posted. Print it and highlight even. I found it very helpful. Learning to step through code with f8 helps isolate when and where something goes wrong.

  10. #10
    Registered User
    Join Date
    09-29-2014
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    45

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    Appreciate the link. Hopefully, someone will review this thread and provide a resolution soon. Thanks again and have a great night

  11. #11
    Registered User
    Join Date
    09-29-2014
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    45

    Re: Combining several small macros into one large one AND Conditional/Sorting Macro Issues

    I fixed it on my own, using the 'call' macro method

+ 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. Macro working on small data , large not
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2014, 12:56 PM
  2. Help w/ sorting & combining vba macros
    By kosnic in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-07-2014, 01:32 PM
  3. Small macro for XY plot for large dataset
    By Celsiane in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-26-2013, 12:36 PM
  4. Replies: 6
    Last Post: 04-29-2011, 08:00 PM
  5. two small issues - please help
    By perfection in forum Excel General
    Replies: 0
    Last Post: 10-16-2010, 06:48 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