Share via


ODBCErrors.Item Method

Excel Developer Reference

Returns a single object from a collection.

Syntax

expression.Item(Index)

expression   A variable that represents an ODBCErrors object.

Parameters

Name Required/Optional Data Type Description
Index Required Long The index number for the object.

Return Value
An ODBCError object contained by the collection.

Example

This example displays an ODBC error.

Visual Basic for Applications
  Set er = Application.ODBCErrors.Item(1)
MsgBox "The following error occurred:" &
    er.ErrorString & " : " & er.SqlState

See Also