+ Reply to Thread
Results 1 to 2 of 2

Macro execution time

  1. #1
    Henry
    Guest

    Macro execution time

    Greetings
    I have seen several post here that reference a time to run a macro. How do
    I time the excution? I have a spreadsheet that is 3rd party supplied and the
    performance of calcs slows down tremedously as more files are opened. I know
    the easy answere is dont open them, however it is necessary for the other
    files
    to be open. In that the macro is 3rd party I am unable to access it and
    post it here. I would like to be able to provide performance time to the
    author.
    Thanks!

  2. #2
    Gareth
    Guest

    Re: Macro execution time

    I normally time macros by doing the following:

    Sub MySub()
    Dim myTime as date

    myTime = now

    'Run the rest of the macro

    'The macro has finished so now write to the
    'debug window the time taken (note this does
    'not include fractions of a second).
    debug.print format(now - mytime, "nn:ss")

    End Sub

    Without being able to access the code you probably won't be able to
    achieve this though. Depending on how your 3rd party macro runs you
    could try and invoke it programmatically by opening the workbook perhaps
    or using SendKeys to fire it - and waiting for calculation to finish
    before printing the time taken.

    Or failing that: use the stopwatch on your cell phone?!

    HTH,
    Gareth

    Henry wrote:
    > Greetings
    > I have seen several post here that reference a time to run a macro. How do
    > I time the excution? I have a spreadsheet that is 3rd party supplied and the
    > performance of calcs slows down tremedously as more files are opened. I know
    > the easy answere is dont open them, however it is necessary for the other
    > files
    > to be open. In that the macro is 3rd party I am unable to access it and
    > post it here. I would like to be able to provide performance time to the
    > author.
    > Thanks!


+ 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