Getting and setting host properties
Sub HostProperties()

' Getting and setting Host properties

    Dim HostFact As HostFactory
    Dim theHost As Host
    Dim HList As List
    
' Get a Host object.
    'tdc is the global TDConnection object.
    Set HostFact = tdc.HostFactory
    Set HList = HostFact.NewList("")
    Debug.Print "The number of hosts in the project is " _
        & HList.Count
    Set theHost = HList.Item(1)
    
    On Error Resume Next
' Print the properities.
    Debug.Print "ID """ & theHost.ID & """"
    Debug.Print "Description """ & theHost.Description & """"
    Debug.Print "Name """ & theHost.name & """"
    Debug.Print "RexServer """ & theHost.RexServer & """"
    Debug.Print "Modified """ & theHost.Modified & """"
    Debug.Print "Virtual """ & theHost.Virtual & """"
' Change the description.
    theHost.Description = "AQT_HOST_1_Test"
' Commit to database.
    theHost.Post
' Check the new value.
    Debug.Print "Description """ & theHost.Description & """"
End Sub