Share via


LookupTable Collection Object

Project Developer Reference

Represents a lookup table collection in Project. The LookupTableEntry object is a member of the LookupTable collection.

Using the LookupTable Object

The following example adds three level entries to a lookup table, where the third level entry is set with three values.

  Sub EditLocationLookupTable(objLookupTable As LookupTable)
Dim objStateEntry As LookupTableEntry
Dim objCountyEntry As LookupTableEntry
Dim objCityEntry As LookupTableEntry

Set objStateEntry = objLookupTable.AddChild("WA")
objStateEntry.Description = "Washington"

Set objCountyEntry = objLookupTable.AddChild("KING", _
    objStateEntry.UniqueID)
objCountyEntry.Description = "King County"

Set objCityEntry = objLookupTable.AddChild("SEA", _
    objCountyEntry.UniqueID)
objCityEntry.Description = "Seattle"

Set objCityEntry = objLookupTable.AddChild("RED", _
    objCountyEntry.UniqueID)
objCityEntry.Description = "Redmond"

Set objCityEntry = objLookupTable.AddChild("KIR", _
    objCountyEntry.UniqueID)
objCityEntry.Description = "Kirkland"

End Sub

See Also