How to check if the OpenDialog is cancelled
To check if the OpenDialog is cancelled try the following code
if (openXLFile.ShowDialog() == DialogResult.Cancel) {
MessageBox.Show("You have cancelled the dialog! Please select a file");
}
No comments:
Post a Comment