I was working in ArcGIS 10.2 with VBA but now I work with Visual Studio 2013 to create addins.

I need to close all processes, I did this with the end statement in VBA but I don't find a command to do the same process in Visual Studio.

closed as off-topic by PolyGeo Aug 6 '17 at 21:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    No need to shout... Can you show some code please, so we know where you're up to. Do you want to deactivate your tool or close a form or do you want to save/exit ArcMap entirely? – Michael Stimson Aug 6 '17 at 20:45
  • ' Step. Do your big process here. boolCont = True For i = 0 To 10000 Application.StatusBar.Message(0) = Str(i) 'Check if the cancel button was pressed. If so, stop process boolCont = pTrkCan.Continue If Not boolCont Then End End If Next i ' Done Set pTrkCan = Nothing Set pStepPro = Nothing Set pProDlg = Nothing – luis merizalde Aug 7 '17 at 1:20
  • i need something that replace the End stament in visual studio – luis merizalde Aug 7 '17 at 1:21
  • 2
    It's better if you post your code in your question (use the edit button) and format it with the {} button to make it easier to read. Calling End stackoverflow.com/questions/116090/… can be dangerous as the Esriaddin is tied (joined) with the ArcMap process so could conceivably terminate both processes or lead to undesired behavior. If I could understand more about why you feel the need to ungracefully exit and what you're doing at the time I could suggest alternatives. – Michael Stimson Aug 7 '17 at 2:02
  • i am showing a progressdialog (using the IProgressDialog2 interface) to display a process progress then i need to finish the process (only Esriaddin) when cancel button is clicked or an error occurs – luis merizalde Aug 8 '17 at 14:32