get a map layer collection
Dim lyrs As IMapLayerCollection = map.Layers
or if you want only from a certain map groupDim lyrs As IMapLayerCollection = mapgrp.Layers
then iterate through the collection and parse out each layer. note that if you have groups then you may have to iterate further For Each lyr As ILayer In lyrs
If TypeOf lyr Is IMapLineLayer Then
Dim lineLyr As MapLineLayer = CType(lyr, MapLineLayer)
Debug.Print(lineLyr.LegendText)
End If
Next lyr