Programs Property (AApp)

Returns the program object as specified by a name or an index.

Syntax

[ obPrograms = ] Object.Programs ( vKey )

The Programs property syntax has the following parts:

 

Name

Type

Description

Object

AApp

AApp object

vKey

Variant

The parameter which specifies the AProgram object. This can be a number (index) or a string (program shortcut name).

obPrograms

AProgram

An AProgram object as specified by the vKey parameter.

Comments

If a program file is missing (shows in yellow in the workspace Window). The return object is Nothing.

Example

The first example runs a program specified by a program number, obtained, for example, via the user's selection from a listbox control:

Run App.Programs(m_nProgram)

The second example uses a string key obtained, for example, from user key-in or a script file:

Run App.Programs(m_sProgram)

Run App.Programs("Language")

Applies to

AApp

See Also

App Variable, AApp Class, ProgramsCount