I've got a shp-file, here is it's attribute table:
It's easy to fill the attribute table of some
pFeature programmatically if I get the feature from cursor:
For example, "RECNO" Field(3) has a numeric format
Set pFeature = pFeatureCursor.NextFeature Set pFeature.Value(3) =2 pFeature.store
Usually, it works fine, I shouldn't even start the Edit session for this.
But when I add a new feature and try to fill the attribute table in this code below, the error "Object required" appears.
Dim pMxDoc As IMxDocument Dim pFeatureLayer As IFeatureLayer Dim pFeature As IFeature Dim pFeatureClass1 As IFeatureClass Set pMxDoc = ThisDocument Set pFeatureLayer = pMxDoc.FocusMap.Layer(0) Set pFeatureClass1 = pFeatureLayer.FeatureClass Set pFeature = pFeatureClass1.CreateFeature ' HERE IS THE PROBLEM Set pFeature.Value(3) = 2