Is This Content Helpful?
We're glad to know this article was helpful.
This article illustrates how to activate one of the ArcMap edit tools programmatically.
Note: For more information on creating a UIControl, see the ArcGIS Desktop Help topic: 'Creating custom commands with VBA and UI Controls'
Code: Dim pCmdBars As ICommandBars Dim pEditBar As ICommandBar Dim pCmdItem As ICommandItem Dim pEditTool As ICommandItem Set pCmdBars = ThisDocument.CommandBars ' Some of the Edit Tools. ' This is the tool that you will use for this sample. Set pEditTool = pCmdBars.Find(ArcID.Editor_DistanceDistance) ' Experiment with some of the remaining tools. ' The Editor SketchTool is the default. ' ***** ArcID.Editor_SketchTool ' Other tools ' ***** ArcID.Editor_IntersectionTool ' ***** ArcID.Editor_Arc Set Application.CurrentTool = pEditTool