+ Reply to Thread
Results 1 to 4 of 4

Macro runs really slow when going to one sheet

  1. #1
    Forum Contributor
    Join Date
    04-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    198

    Macro runs really slow when going to one sheet

    Macro runs fast when I step through it until I go to one of my sheets and it gets to this code... what would cause this to take so long the rest of the macro takes seconds and this piece here takes about 2 minutes to complete... is there an easier way of doing this I need it to clear all borders from the sheet...


    Current Code:
    Please Login or Register  to view this content.
    Thanks,

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro runs really slow when going to one sheet

    Hi,

    Have you set Application.ScreenUpdating = False before you do the changes ?

    Your code should be like :

    Please Login or Register  to view this content.
    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,537

    Re: Macro runs really slow when going to one sheet

    How were the borders put in?
    Please Login or Register  to view this content.
    selects 16,777,216 cells in excel 2003 (65,536 Rows and 256 Columns)
    Can you change it to a realistic number.

    Is this any faster?
    Please Login or Register  to view this content.
    Last edited by jolivanes; 11-21-2014 at 12:09 AM.

  4. #4
    Forum Contributor
    Join Date
    04-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    198

    Re: Macro runs really slow when going to one sheet

    It was referencing some outrageous cell as stated above and causing it to take forever... Thanks Everyone

+ 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] Macro with calendar runs slow
    By pezalmendra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-27-2013, 01:02 PM
  2. Excel2003 Macro runs slow???
    By Infinity in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2006, 01:55 AM
  3. After printing, macro runs slow???
    By Infinity in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2006, 10:38 PM
  4. Macro runs slow
    By Sandy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-20-2005, 12:05 PM
  5. macro runs slow
    By nanomiter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2005, 01: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