' Enumerate layers pEnumLayers = pMap.Layers pEnumLayers.Reset() pLayer = pEnumLayers.Next() Do Until pLayer Is Nothing If pFLayer.Name = [layer name] Then Exit Do End If pLayer = pEnumLayers.Next Loop
For j = 0 To pMap.LayerCount - 1 GetName = pMap.Layer(j).Name 'One level in If TypeOf pMap.Layer(j) Is ESRI.ArcGIS.Carto.IGroupLayer Then pCompositeLayer = pMap.Layer(j) For g = 0 To pCompositeLayer.Count - 1 'cycle through the composite layer 'GET THE NAME of each layer here Next End If Next