Scripts Property

Microsoft Excel Visual Basic

expression.Scripts

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example adds a new VBScript block to the Scripts collection on the active worksheet.

Set objScrs = ActiveSheet.Scripts
Set objNewScr = objScrs.Add
objNewScr.Language = msoScriptLanguageVisualBasic