+ Reply to Thread
Results 1 to 6 of 6

Why does this VBA run so slow?

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    20

    Angry Why does this VBA run so slow?

    Can anyone offer up a reason why the below VBA runs so slow? Can it be improved to run fast?

    Cheers John

    Please Login or Register  to view this content.
    Last edited by arlu1201; 02-23-2013 at 11:44 PM.

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

    Re: Why does this VBA run so slow?

    Maybe

    Please Login or Register  to view this content.
    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    38,117

    Re: Why does this VBA run so slow?

    Shorter, hopefully quicker:

    Please Login or Register  to view this content.

    So long as print area is the same for each sheet


    Regards, TMS
    Last edited by TMS; 02-23-2013 at 06:54 PM.
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: Why does this VBA run so slow?

    John_Day,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature below this post.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Registered User
    Join Date
    07-24-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Why does this VBA run so slow?

    Thanks SHG worked a treat!!!

    TMS thanks also.

    John

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    38,117

    Re: Why does this VBA run so slow?

    You're welcome.

    I have to admit that I got carried away with the looping aspect and overlooked the differences for the first couple of sheets.

    For completeness:

    Please Login or Register  to view this content.

    No sheet or range selection. However, the Goto at the end will cause the Factory UTE sheet to be selected.

    Regards, TMS

+ 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