VB execution time - Statistica Visual Basic - Statistica - Dell Community

VB execution time

VB execution time

This question is not answered

Dear Forum,

Is there a way to measure the execution time of Statistica Visual Basic code?  And, if so, can this be written to an output table?  Maybe by reading the system time when a VB macro starts and then when it stops?  Or another method?

For what it is worth, I did try searching for answers in the help files, on this forum, and online before posting, but did not find anything that looked applicable.  My apologies for my meager VB skills.

Thank you in advance for any help that you might be able to provide.

Best regards,


All Replies
  • Hi Cliff,

    The most straightforward way to measure the time is probably using the GetTickCount Windows API (MSDN). This function returns the number of miliseconds that have elapsed since the system has started. Here's how you would declare it in VB:

    Private Declare Function GetTickCount Lib "kernel32" () As Long

    Please notice that the counter will reset after the system has been running for aproximately 50 days which may be an issue in some cases.

    Hope this helps,

  • Hi Mario.  Many thanks for the suggestion.  I'll give it a try.