+ Reply to Thread
Results 1 to 5 of 5

how to combine code

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    how to combine code

    Hello. This first code opens all files in a folder and renames the first tab in each open file. The second adds the content from each tab into one tab. Is there a way that I can combine the two codes into one? So taht I don't have to run two macros?

    Code 1

    Please Login or Register  to view this content.
    Code 2

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: how to combine code

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: how to combine code

    Oh cool, but is my code inefficient? That is, would it be better to include the second piece of code as part of the first?

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: how to combine code

    It doesn't seem to be sloppy in any way!

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: how to combine code

    Thanks for the rep!

+ 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 code same combine the description
    By Klitos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2013, 05:16 AM
  2. [SOLVED] Combine code in VBA
    By clifton1230 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2013, 12:21 AM
  3. Combine two vba code loops into one
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2011, 02:27 PM
  4. Combine & Shorten Code
    By QPM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2010, 04:49 AM
  5. combine code
    By Dennisli2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2008, 12:17 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