+ Reply to Thread
Results 1 to 3 of 3

Applying a macro to multiple sheets

  1. #1
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Victoria, Australia
    MS-Off Ver
    365l
    Posts
    170

    Applying a macro to multiple sheets

    Leith Ross gave me a solution to adjusting Barrier positions for Non-starters. I didn't think to include the fact that it had to be applied to multiple worksheets. His solution works perfectly, but when I try to run it over multiple sheets, it reduces the lowest barrier position by 1 for each sheet that has a non starter and has been previously processed by the macro. The result in the attached example is that by race 9, barrier position 1 has become -5. Leith's code is in module 1 and called "UpdatePositions". My attempt is called "UpdateBarriers" in module 2.

    One other problem with my attempt is that when a race has no starters in it, the macro stops working, rather than completing the outside "For" statement.

    Any assistance on these issues will be greatly appreciated.

    Steve W
    Attached Files Attached Files
    Last edited by swallis; 10-15-2011 at 01:37 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Applying a macro to multiple sheets

    hi, swallis, I did not go into the code logic, just added loop for the sheet with number names

    Please Login or Register  to view this content.
    Last edited by watersev; 10-14-2011 at 03:06 AM.

  3. #3
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Victoria, Australia
    MS-Off Ver
    365l
    Posts
    170

    Re: Applying a macro to multiple sheets

    Thanks Watersev. Works perfectly and I even found an error I made manually in today's races

+ 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