+ Reply to Thread
Results 1 to 7 of 7

Timing Macro but displaying Macro name

  1. #1
    Registered User
    Join Date
    10-14-2017
    Location
    Miami, Florida
    MS-Off Ver
    2016
    Posts
    83

    Timing Macro but displaying Macro name

    Good morning,

    I need to run multiples macros but i need to know how long each macro take to run.

    With in my code I'm using some macro lines it display the time but no the Name

    This is what i'm using

    Please Login or Register  to view this content.

    It would be nice if someone help me..


    Appreciated
    Last edited by AndyJr; 12-18-2017 at 09:27 AM. Reason: add End Sub to code

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Timing Macro but displaying Macro name

    Not tested but you may want to try the codes listed here
    If your original question was resolved, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.
    Click on the Add Reputation button (located at the lower-left corner of all post) for those who assisted you in solving your issue.

  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
    44,425

    Re: Timing Macro but displaying Macro name

    Maybe:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    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
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Timing Macro but displaying Macro name

    you would need to access the VBE object model which may or may not be allowed in your environment.

    something like:

    Please Login or Register  to view this content.
    The above would return module name. You would then have to see if you can get the sub name from there.

    The option under Macro Security | Trust Access to the VBA project object model would need to be checked for something like that to work.

    If you google what you are asking for most techniques seem to rely on error handling and/or static wording to output the subroutine name.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  5. #5
    Registered User
    Join Date
    10-14-2017
    Location
    Miami, Florida
    MS-Off Ver
    2016
    Posts
    83

    Re: Timing Macro but displaying Macro name

    Hi Syrkai,


    After work i'll try, Hope to solve this issue..


    Thanks!

  6. #6
    Registered User
    Join Date
    10-14-2017
    Location
    Miami, Florida
    MS-Off Ver
    2016
    Posts
    83

    Re: Timing Macro but displaying Macro name

    Hi TMS,

    Wont work, MsgBox change to Red color on VBA editor

    Please Login or Register  to view this content.
    Thanks

  7. #7
    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
    44,425

    Re: Timing Macro but displaying Macro name

    I missed a double quote:

    Please Login or Register  to view this content.

+ 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. timing issue with macro
    By vincenzo345 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-05-2013, 01:54 AM
  2. Timing a macro
    By sarahmoth in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2009, 07:31 AM
  3. Timing a macro to execute
    By mattsgr1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2007, 05:34 AM
  4. Replies: 2
    Last Post: 02-23-2006, 12:15 PM
  5. [SOLVED] [SOLVED] Possible Macro Timing Overrun generates Excel Exception
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2006, 12:15 PM
  6. Timing a macro
    By ducttape in forum Excel General
    Replies: 2
    Last Post: 02-01-2006, 06:25 PM
  7. [SOLVED] Excel 2003 has wrong timing using the worksheet_change macro
    By Jan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-14-2006, 02:35 AM
  8. Macro timing might be the problem
    By Oreg in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-04-2005, 10:52 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