Get the lists associated with fields
Public Sub GetListsForCustomFields()
' Get the project lists associated with fields
    
    Dim cust As Customization
    Dim custFields As CustomizationFields
    Dim aCustField As CustomizationField
    Dim custLists As CustomizationLists
    Dim aCustList As CustomizationList
    Dim ListName$, cnt%
    
    ' Get the customization object and CustomizationFields.
    'tdc is the global TDConnection object.
    Set cust = tdc.Customization
    Set custFields = cust.Fields
    
    '
    msg = "Active Entities for requirement table : " & Chr(13)
    
    'Walk through the fields of the REQ table and output
    ' some of the properties of the fields that are linked
    ' to custom lists.
    For Each aCustField In custFields.Fields("REQ")
        If aCustField.IsActive Then
           
            ListName = ""
            
        'If the field is linked to a custom list, get the name
        ' of the list and the field properties.
            If Not (aCustField.List Is Nothing) Then
                cnt = cnt + 1

                ' Get the CustomizationList from
                ' CustomizationField.List.
                Set aCustList = aCustField.List
                ListName = _
                    " [Values from " & aCustList.name & ".]"
                msg = msg & aCustField.ColumnName _
                    & ", " & aCustField.UserLabel _
                    & ListName & Chr(13)
            End If
            
            
        End If
    Next
    '
    msg = msg & vbCrLf & "Count of fields with lists = " & CStr(cnt)
    MsgBox msg
    
End Sub