ICursors.ItemByName [Property][Get]
- Last UpdatedJul 18, 2023
- 1 minute read
Retrieves the Cursor at the specified index.
Defined As
-
[VBA] Object ItemByName(name As String)
-
[Cicode] OBJECT get_ItemByName(STRING name)
-
[C++] HRESULT get_ItemByName (BSTR name, ITrendCursor **cursor)
Parameters
name
[in] The name of the necessary cursor.
Execution Result
If the property get succeeds, the return value will be Success. If the return variable is bad, the return value will be InvalidArgument. If the cursor is not found, the return value will be InvalidArgument.
If the collection is deleted, the return value will be GeneralFailure.
Calling Syntax
This example assumes you have a valid reference to the cursors collection, and that there is a cursor in the collection named "MyCursor".
[VBA]
Sub Example(cursors As Object)
Dim cursor As Object
Set cursor = cursors.ItemByName("MyCursor")
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursors)
OBJECT hCursor = _ObjectCallMethod(hCursors, "get_ItemByName", "MyCursor");
END