Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmScreen Object / SearchText1 Method
The text to be searched.
Start row location.
Start column location.
A FindOption Enumeration enumeration that specifies the search direction.
Example
SearchText1 Method
Searches the specified text, starting from the specified screen location.
Syntax
expression.SearchText1( _
   ByVal text As String, _
   ByVal startRow As Integer, _
   ByVal startColumn As Integer, _
   ByVal findoption As FindOption _
) As ScreenPoint object 
where expression is a variable that represents a IbmScreen Object

Parameters

text
The text to be searched.
startRow
Start row location.
startColumn
Start column location.
findoption
A FindOption Enumeration enumeration that specifies the search direction.

Return Value

A ScreenPoint object object that represents the row and column coordinates on the host screen.
Remarks

For more about using the SearchText1 method, see:

Navigating Through Open Systems Sessions

Using Named Arguments

Example
This sample searches for the "PDF" string on a screen and returns the column and row of the string if it is found.
Sub SearchForText()
    Dim screenPosition As Attachmate_Reflection_Objects_Emulation_IbmHosts.ScreenPoint
    
    Set screenPosition = ThisIbmScreen.SearchText1("PDF", 1, 1, FindOption_Forward)
    
    If IsEmpty(screenPosition) Or (screenPosition Is Nothing) Then
        MsgBox "Not found"
    Else
        MsgBox "found at row " & screenPosition.row & " and column " & screenPosition.column
    End If
    
End Sub
See Also