+ Reply to Thread
Results 1 to 11 of 11

How to see Macro running time

  1. #1
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    How to see Macro running time

    Hi all

    I have a workbook that runs with so many macros, Sometimes if I request something it takes so long to produce , I just wonder if there is a place on Excel VBA section to see the execution time for each macro or if there a macro to give me each macro's running time?

    I like to tackle the macros that takes to long to execute.

    Any help will be apricated

    Kind regards

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: How to see Macro running time

    Something like...
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: How to see Macro running time

    Attached file is how I check.
    The process in the file enabled me to predict if files were going to get unwiedly when containing several years worth of data.
    The array is seeded by setting the number of rows of data upto 1million+ (the sort is between two dates and person code).
    Purpose is to generate transaction history and import file into Sage50 - I have highlighted the timer code at each end - use similar approach enclosing your macro.
    torachan.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: How to see Macro running time

    thank you for both of your answers but I don't understand how do I use both of these solutions on my workbook.

    I have 50 different macros in different Modules , how these will give me a timing report on these macros at one go?

    sorry if I am being a bit dumb

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: How to see Macro running time

    did you write the macro's, if so @sintek's code should be self-explanatory - you put the first two lines at the start of your macro and the last line at the end then run the macro as normal and look at the debug print when it has finished, do this with all the macro's and you should then know how long each one actually takes.

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: How to see Macro running time

    Or something like this to see how long it takes for all...
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: How to see Macro running time

    Thank you for this I will try this, I really appreciate

  8. #8
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: How to see Macro running time

    Thank you again, I have tried this code but nothing has happened, if this is going to give me the total of running time it is not what need , I like to see each of these Macros running time

    Please Login or Register  to view this content.

  9. #9
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: How to see Macro running time

    I have tried this code but nothing has happened, if this is going to give me the total of running time it is not what need , I like to see each of these Macros running time
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: How to see Macro running time

    I see I need to do for each macro

    thank you

  11. #11
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    Re: How to see Macro running time

    Well your words were....
    I like to see each of these Macros running time

+ 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. Running a macro at specific time
    By HelloWorld518 in forum Access Tables & Databases
    Replies: 1
    Last Post: 06-22-2013, 07:38 PM
  2. Want to reduce Macro running time
    By rvkadu1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2013, 12:31 PM
  3. Macro crashes from time to time when running from another computer
    By Kelshaer in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-31-2012, 09:12 AM
  4. Running a macro on time
    By phil2006 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2008, 04:17 AM
  5. Running a macro at a specified time
    By The Bobka in forum Excel General
    Replies: 1
    Last Post: 06-30-2005, 01:05 PM
  6. Macro running time
    By Pradip Jain in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2005, 09:43 AM
  7. Running a macro at a certain time
    By Tam in forum Excel General
    Replies: 3
    Last Post: 03-02-2005, 11:06 AM
  8. [SOLVED] All time running macro
    By MrHappy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-12-2005, 12: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