+ Reply to Thread
Results 1 to 5 of 5

repeat a macro until end of workbook

  1. #1
    Registered User
    Join Date
    04-12-2008
    Posts
    28

    repeat a macro until end of workbook

    Hi all,
    I was wondering if anyone knows some code that I can add to a macro that will repeat that macro on every subsequent worksheet in the workbook.
    Thanks
    Last edited by RPOD; 08-30-2009 at 02:19 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: repeat a macro until end of workbook

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-12-2008
    Posts
    28

    Re: repeat a macro until end of workbook

    Thanks for the quick reply.
    Is there a way to have the macro stop at the last worksheet in the workbook?
    It appears that now the macro runs on preceding sheets in the workbook as well.
    Thanks..

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: repeat a macro until end of workbook

    If you want the macro to run on the Activesheet and every sheet AFTER that one and not on any of the sheets that come prior to the activesheet, maybe this would do:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    04-12-2008
    Posts
    28

    Re: repeat a macro until end of workbook

    Thanks JB -
    Works great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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