[Visual Basic 6.0]Function FindLayerByName (pMap as IMap, sName as String) as ILayer Dim i as Integer For i = 0 to pMap.LayerCount -1 If pMap.Layer(i).Name = sName Then Set FindLayerByName = pMap.Layer(i) End If Next End Function
[Visual Basic .NET, C#, C++]
No example is available for Visual Basic .NET, C#, or C++. To view a Visual Basic 6.0 example, click the Language Filter button
in the upper-left corner of the page.