Name

ScriptEngine Function

Syntax

ScriptEngine( )

Return Value

A Variant of subtype String.

Description

Indicates the scripting language currently in use.

Rules at a Glance

According to the documentation, the function returns the values shown in the following table:

Return Value

Description

JScript

Microsoft JScript

VBA

Visual Basic for Applications

VBScript

VBScript

Programming Tips & Gotchas

The function is implemented in VBScript.dll, as well as in JScript.dll. However, it is not implemented in the VB Version 6 runtime libraries. Calls to this function from VBA code will generate an error rather than return the string “VBA”.

VBA/VBScript Differences

This function is not supported in VBA.

Get VBScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.