Execute: ITabSearchResult;
The Execute method is used to perform search and, if successful, returns the result.
Sub Main;
Var
MB: IMetabase;
Rep: IPrxReport;
Tab: ITabSheet;
CellSearch: ITabCellSearch;
Result: ITabSearchResult;
s: String;
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
s:=Result.Range.Address;
End If;
End Sub Main;
As a result the "123" value will be searched for, and in case of successful search the "s" variable will contain the address of the found cell.
See also: