MenusCount Property (AForm)

Returns the number of menus objects in this object.

Syntax

 [ lMenusCount =] Object.MenusCount

The MenusCount property syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

lMenusCount

Long

A integer specifying the number of menus in the object.

Comments

This property is read-only at run time.

You can use this property to cycle through all the menus on a form and perform an operation on each.

Example

The following example iterate through all the menus of the form object and change the caption of each menu as in the following code:

For i=0 to MenusCount-1

Menus(i).Caption="ABC"

Next

Applies to

AForm

See Also

Menus