AnsweredAssumed Answered

arcmap add-in open csv open file dialog crash when click "Cancel" or close the dialog

Question asked by littleleaf on Sep 21, 2014
Latest reply on Sep 21, 2014 by Frank.Hellwich

Hello everyone,

I am using vb.net arcmap 10.2.2 add-in.

I developed a function to allow user open a csv file from local and other functions on the opened csv file. But when I click "Cancel" on the dialog or just close the dialog, the arcmap just crash.

I want to check what cause the issue?

The code isas follows:

  Dim openFileDialog1 As New OpenFileDialog
 
Dim fileName As String
  openFileDialog1
.Filter = "Comma delimited|*.csv"
  openFileDialog1
.Title = "Open a csv File"
  openFileDialog1
.ShowDialog()
  fileName
= openFileDialog1.FileName

Can please tell me the error is caused by my code or arcmap issue? Thanks a lot.

Outcomes