Migrating VBA Code to ArcGIS 10

682
2
11-08-2011 09:51 AM
PhyllisDavis
New Contributor II
Have a quick question...I'm migrating code that I wrote in ArcGIS 9.3 to be compatible with ArcGIS 10. I have everything working in Visual Studio 2008, except for one line of code....any suggestion on how to fix this error?

I'm trying to start an editing session if one is not already started. The error is "Name esriStateEditing is not declared"

 
If pEditor.EditState <> esriStateEditing Then
pEditor.StartEditing(pEditDataset.Workspace)
End If

How do I declare this code?

Any help is greatly appreciated. Thanks!

Thanks! Any help would be greatly appreciated.
0 Kudos
2 Replies
NeilClemmons
Regular Contributor III
You either add an Imports statement for the library that contains the enumeration or you fully qualify the enumeration constant.  Below is the second option...

If pEditor.EditState <> esriEditState.esriStateEditing Then
0 Kudos
PhyllisDavis
New Contributor II
Thanks, Neil!!!!
0 Kudos