Syntax

expression.Language

expression An expression that returns a Script object.

Return Value
MsoScriptLanguage

Remarks

The MsoScriptLanguage constants used with the Language property are also used in theparameter in the Addmethod of the Scriptscollection.

Example

This example checks the Language property to ensure that the first script in worksheet one in the active workbook is written in VBScript.

Visual Basic for Applications
If ActiveWorkbook.Worksheets(1).Scripts(1).Language > _ msoScriptLanguageVisualBasic Then MsgBox "Language is not set to VBScript." End If
Language