Language Property Example

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

If ActiveWorkbook.Worksheets(1).Scripts(1).Language <> _
    2 Then
      MsgBox "Language is not set to VBScript."
End If