Results 1 to 4 of 4

Speed up macro

Threaded View

  1. #3
    Registered User
    Join Date
    07-19-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Speed up macro

    Thanks JBeaucaire, I really appreciate your response.

    I had read the same thing, and tried it out and it didnt /seem/ to make any difference. Since you mentioned it I went ahead and tested it, first I ran it twice with two matrices and got the times of 34 and 35 seconds.

    Then I took out the :


    Dim oldstatusbar
    Application.DisplayStatusBar = True
            Application.StatusBar = "Processing matrix " & x & " of " & UBound(Matrix) + 1 & " : please be patient..."
       
        Application.StatusBar = "Ready"

    And added at the begining and end:

    Application.DisplayStatusBar = False
    Application.DisplayStutasBar = True
    I got 47 seconds and 47 seconds on the same two matrices.

    Then reverted back to the original and ran it again and got 36 and 35 seconds.

    So I am not sure exactly how it will respond to 100 matrices versus 2, maybe it would make it faster with a bunch more to process but with just a few it seemed to make it take longer which is weird. Let me try it with no Status Bar code at all.

    Edit: With no status bar coding at all (not eveing making it false and true, just nothing) I got 45 and 47 seconds. Then I thought to myself maybe storing x and mycol in the first part but not really doing anything with it made it slow down. So I took out x = x +1 and all the MyCol lines and got 46 and 47 seconds. Went ahead and reverted it back to original code and got 36 and 35 seconds. =(
    Last edited by Jasrenkai; 07-19-2010 at 09:36 PM.

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