CALL function

Runs a function inside a Windows DLL. It is an old Excel 4 macro feature, kept only for very old workbooks.

Works in desktop Excel only

Syntax

=CALL(module_text, procedure, type_text, [argument1], …)

How to use CALL in Excel, step by step

CALL doesn’t run in a web practice sheet because it runs code from a DLL on your computer (old Excel macro feature). Follow these steps in Excel itself.

You’ll need

  • Excel for Windows
  • An Excel 4.0 macro sheet
  • Macros enabled in the Trust Center
  1. Allow macros. File › Options › Trust Center › Trust Center Settings › Macro Settings › enable Excel 4.0 macros (only for files you trust).
  2. Insert a macro sheet. Right-click a sheet tab › Insert › MS Excel 4.0 Macro.
  3. Call the DLL. On the macro sheet type =CALL("Kernel32","GetTickCount","J"). "J" means the function returns a whole number.
  4. Prefer VBA today. For new work use a VBA Declare statement or a modern add-in instead — CALL is blocked in many organisations.

Example

=CALL("Kernel32","GetTickCount","J")

Result: Milliseconds since Windows started

Wrong type_text codes can crash Excel. Save first.