Navigation: FXLV4SpeedTools > Using FastExcel calculation methods from VBA >

MILLITIMER function

 

 

 

MILLITIMER function

The MILLITIMER function is a wrapper function for the Windows medium-resolution timer API.

The function returns a long containing milliseconds. The resolution of the timer is about 5 milliseconds. The function itself takes about 1 millisecond to execute when called from VBA on the same machine.

The function is not volatile, and is primarily designed to be called from VBA Subs/Functions rather than from a worksheet.

MILLITIMER Syntax

MILLITIMER()

MILLITIMER Remarks

To call the function from VBA you must first make a reference from the VBE to FastExcelV4:

Open the VBE

Open a module within your VBA project

Tools->References and check FastExcelV4.

It is also possible to evaluate the function from VBA as a worksheet function using Evaluate, but this incurs significant extra overhead.

 

 

 

Copyright © 2023 Decision Models Ltd