Setting Target Layer

Discussion created by diniz on May 30, 2011
Latest reply on May 31, 2011 by shiva_gis
So, i can set the target layer in the editor using a simple code:

Dim pEditor As IEditor
Set pEditor = Application.FindExtensionByName("esriEditor.Editor")
Dim pMap As IMap
Set pMap = pEditor.map
Dim pFeatLayer As IFeatureLayer2
Dim pEditLayers As IEditLayers
'FindLayer returns the Layer with the name 'feicao'
Set pFeatLayer = FindLayer(pMap, feicao)
Set pEditLayers = pEditor
pEditLayers.SetCurrentLayer pFeatLayer, 0

But i want to make something different, how can i target an attribute of a layer in the Editor's Target.
For example if i have the layer Hydrography with a field Type and attributes River, Lake, Ocean i can, by hand, select the target, for example, Hydrography: River. Can i do it by a VBA macro?