How to list tables in a form with Arcobject?

Discussion created by eber2301 on Jun 14, 2011
Latest reply on Jun 17, 2011 by syamarth
I want to list Tables (Itables) in a form with ArcObjects, but I can't it.
I'm using this code.

Dim pMxDoc As IMxDocument
Set pMxDoc = Application.Document
Dim pTableCollection As ITableCollection
Dim pMap As IMap
Set pMap = pMxDoc.FocusMap
Set pTableCollection = pMap
Dim tabla As ITable
Dim ptabla As IFeatureLayer
Dim ntabla As String
For i = 0 To pTableCollection.TableCount - 1
Set tabla = pTableCollection.Table(i)
'Dim pName As IName
ntabla = tabla.                     '********* I can't get name of table
lista.AddItem (ntabla)