다음을 통해 공유


CustomControl.ObjectVerbsCount Property (Access)

You can use the ObjectVerbsCount property in Visual Basic to determine the number of verbs supported by an OLE object. Read-only Long.

Syntax

.ObjectVerbsCount

A variable that represents a CustomControl object.

Remarks

The ObjectVerbsCount property setting is a value that specifies the number of elements in the ObjectVerbs property array.

This property setting isn't available in Design view.

The list of verbs an OLE object supports may vary, depending on the state of the object. To update the list of supported verbs, set the control'sAction property to acOLEFetchVerbs.

Example

The following example returns the verbs supported by the OLE object in the OLE1 control and displays each verb in a message box.

Sub GetVerbList(frm As Form, OLE1 As Control) 
 Dim intX As Integer, intNumVerbs As Integer 
 Dim strVerbList As String 
 
 ' Update verb list. 
 With frm!OLE1 
 .Action = acOLEFetchVerbs 
 intNumVerbs = .ObjectVerbsCount 
 For intX = 0 To intNumVerbs - 1 
 strVerbList = strVerbList & .ObjectVerbs(intX) & "; " 
 Next intX 
 End With 
 
 ' Display verbs in message box. 
 MsgBox Left(strVerbList, Len(strVerbList) - 2) 
End Sub

참고 항목

개념

CustomControl Object Members

CustomControl Object