+ Reply to Thread
Results 1 to 11 of 11

How do I make my macro run in all worksheets

  1. #1
    Registered User
    Join Date
    05-12-2013
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    33

    How do I make my macro run in all worksheets

    How do I make my macro tun in a loop through all sheets?

  2. #2
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: How do I make my macro run in all worksheets

    Please Login or Register  to view this content.
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

  3. #3
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: How do I make my macro run in all worksheets

    Try this:


    Please Login or Register  to view this content.


    Shelton A.
    If Helpful, Add Reputaion!

  4. #4
    Registered User
    Join Date
    05-12-2013
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: How do I make my macro run in all worksheets

    I don't know why, but I can't get either one of these to work.

  5. #5
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: How do I make my macro run in all worksheets

    Can you upload your workbook with your code?

  6. #6
    Registered User
    Join Date
    05-12-2013
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: How do I make my macro run in all worksheets

    I run the following macros to get my final product which is Sheet 1. Sheets 2, 3, 4, 5 are what I start with.
    Please Login or Register  to view this content.
    I have a fourth macro that runs all three macros one after another because I don't know how to combine them. Currently I have to do this "runall" macro on each page. I'd like a macro to run it on all sheets. Each day it varies how may sheets I get.

    Please Login or Register  to view this content.
    Moderator's Note: Please use Code Tags when posting code. It makes is easier to read and to copy. I added them for you this time.
    Attached Files Attached Files
    Last edited by Leith Ross; 05-21-2014 at 07:05 PM. Reason: Added Code Tags

  7. #7
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: How do I make my macro run in all worksheets

    See the atatched

    All codes placed in a module.

    I didn't combine your code as not to confuse you but if I were (I didn't test) since each are running for each sheet technically you can just run eberything combined as so:


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by playaller; 05-21-2014 at 07:43 PM.

  8. #8
    Registered User
    Join Date
    05-12-2013
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: How do I make my macro run in all worksheets

    Thank you for helping me with this. I used the above macro and it worked great on sheet 1 but then a window popped up asking for sheet 2 and so forth each time I clicked ok it just ran in the same sheet making the first sheet a mess. It did not move to the next sheet automatically. I don't have a lot of knowledge about this so maybe I'm just missing something? Again, I thank you for your time and help with this.

  9. #9
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: How do I make my macro run in all worksheets

    Use this on your original workbook that you haven't run the previous code on. Also note sheet1 in your original upload doesn't seem to be formatted like the other sheets as it doesn't have the same header rows so they all need to be the same based on the combining of all your code. or sheet1 is going to look not as expected.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    05-12-2013
    Location
    Utah
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: How do I make my macro run in all worksheets

    It works perfect! Thank you for helping me with this. I really appreciate it.

  11. #11
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: How do I make my macro run in all worksheets

    You're more than welcome. Glad I could help!

+ 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. Replies: 8
    Last Post: 11-08-2013, 07:46 AM
  2. Macro to make URLs Live In Worksheets
    By tdm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2012, 03:19 AM
  3. [SOLVED] how do I make changes in several worksheets at once?
    By Becky in forum Excel General
    Replies: 1
    Last Post: 02-02-2005, 08:06 PM
  4. [SOLVED] how do I make changes in several worksheets at once?
    By becky in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-02-2005, 08:06 PM
  5. [SOLVED] How to make Add-In worksheets viewable.
    By Bing in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2005, 03:06 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