Public Sub Tables()

   Dim oTables As CCodeTables

   Set oTables = New CCodeTables

   oTables.Init REApplication.SessionContext


   Dim oTable As CCodeTable

   Dim lID As Long

   'Loop through the tables to find the one you need

   For Each oTable In oTables

       If oTable.Fields(ctfNAME) = "NewAttributeTable" Then

       'Get the ID

           lID = oTable.Fields(ctfCODETABLEID)

           Exit For

       End If


   Next oTable



   Set oTables = Nothing


   Set oTable = Nothing


   'Load the collection of table entries for the requested table

   Dim oTEs As CTableEntries

   Set oTEs = New CTableEntries

   oTEs.Init REApplication.SessionContext, lID


   'Get a count of table entries

   Debug.Print oTEs.Count


   Dim oTE As CTableEntry


   'loop through the table entries

   For Each oTE In oTEs

       'and display them

       Debug.Print oTE.Fields(tableentry_fld_LONGDESCRIPTION)


   Next oTE



   Set oTEs = Nothing


   Set oTE = Nothing

End Sub

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.