Show contents 

Tab > Tab Assembly Interfaces > ITabSheet > ITabSheet.CreateCellSearch

ITabSheet.CreateCellSearch

Syntax

CreateCellSearch: ITabCellSearch;

Description

The CreateCellSearch method allows to create an object, which searches for a table cell.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Rep: IPrxReport;
    Tab: ITabSheet;
    CellSearch: ITabCellSearch;
    Result: ITabSearchResult;
    i,j: Integer;
Begin
    MB:=MetabaseClass.Active;
    Rep:=MB.ItemById("Reg_rep").Bind As IPrxReport;
    Tab:=Rep.ActiveSheet.Table;
    CellSearch:=Tab.CreateCellSearch;
    CellSearch.Text:="123";
    Result:=CellSearch.Execute;
    If Result<>Null Then
        i:=Result.CurrentRow;
        j:=Result.CurrentColumn;
    End If;
End Sub UserProc;

As a result the "123" value will be searched for, and in case of successful search the "i" variable will contain the row number, and the "j' variable - the column number of the found cell.

See also:

ITabSheet