Navigation: FXLV4Profiler >

Timer Functions

 

 

 

MICROTIMER function

The MICROTIMER function is a wrapper function for the Windows high-resolution timer API.

The function returns a double containing seconds. The resolution of the timer is dependent on the clock speed of your PC, but is about 1 microsecond on a 1200MHZ AMD. The function itself takes about 5 microseconds 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.

MICROTIMER Syntax

MICROTIMER()

MICROTIMER Remarks

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

Open the VBE (Alt F11)

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.

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.

STRCOLID function

The STRCOLID function returns an alphabetic column name (A to XFD) given a column number.

STRCOLID Syntax

STRCOLID(jColNo)

JColNo

jColNo is the number of the column you want to convert to a column name.

STRCOLID Remarks

If the column number is greater than 16384 STRCOLID returns #N/A

STRCOLID can be used either as a worksheet function or from VBA.

The main use of STRCOLID as a worksheet function is to calculate a cell address as a string for use with INDIRECT.

 

 

 

 

Copyright © 2022 Decision Models Ltd.