Search
Table.ColumnFromPoint Method
See Also
 



Gets the column index of the cell that contains the specified point.

 Syntax

VB6  Copy Code

Public Function ColumnFromPoint( _
    ByVal x As Long, _
    ByVal y As Long _
) As Long

C++  Copy Code

public:
int ColumnFromPoint (
    int x,
    int y
)

 Parameters

x
The x coordinate of the point.
y
The y coordinate of the point.

 Return Value

The column index of the cell that contains the specified point, or -1 if there is no such cell.

 Remarks

If the found cell spans more than one column, this method returns the index of the first column. RowFromPoint and ColumnFromPoint also consider the CurrScrollRow value and whether there are collapsed table sections defined through HeaderRow, so that the returned cell is the one that visually occupies the specified position.

 See Also