Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.IbmHosts Library / Attachmate.Reflection.Objects.Emulation.IbmHosts Library / IbmScreen Object / GetFields Method
The type of field.This is a FieldType Enumeration value that defines the type of field to get (protected, unprotected, or any).
Example
In This Topic
    GetFields Method
    In This Topic
    Gets a host field collection that matches specifed field attributes.
    Syntax
    expression.GetFields( _
       ByVal fieldType As FieldType _
    ) As HostField() object 
    where expression is a variable that represents a IbmScreen Object

    Parameters

    fieldType
    The type of field.This is a FieldType Enumeration value that defines the type of field to get (protected, unprotected, or any).

    Return Value

    A HostField Object collection.
    Example
    This sample gets all the unprotected fields on a screen and prints their screen positions.
    Sub GetFieldsExample()
        Dim fields() As HostField
        Dim field As Variant
     
       
        fields = ThisIbmScreen.GetFields(FieldType_Unprotected)
        
        For Each field In fields
        
            
            If Trim(field.text) = "" Then
                text = " is empty"
            Else
                text = " contains " & field.text
            End If
     
            Debug.Print "Field at row " & field.startRow; " and column " & field.startColumn & text
            
        Next
         
        
    End Sub
    See Also