Using the deprecated interface and method IExportDialog::DoModal crashes ArcMap. Older code that uses this deprecated interface will result in errors when the DoModal method is called.
Use IExportFileDialog instead:Public Sub testExportFileDialog()On Error GoTo EH:Dim efd As IExportFileDialogSet efd = New ExportFileDialogefd.DocumentName = "ExportTest"Dim pixelBounds As IEnvelopeSet pixelBounds = New EnvelopepixelBounds.PutCoords 0, 0, 300, 300Dim b As Booleanb = efd.DoModal(pixelBounds, Nothing, Nothing, 75)MsgBox bExit SubEH:MsgBox Err.Number & vbCrLf & Err.DescriptionEnd Sub