ElvisSteel
Board Regular
- Joined
- Mar 23, 2009
- Messages
- 122
Hi,
I have a macro that prompts the user for an Excel workbook and displays the file open dialog as follows...
How do I detect an incorrect password so I can pop up a message and get them to try again?
Thanks
I have a macro that prompts the user for an Excel workbook and displays the file open dialog as follows...
Code:
NewFileName = Application.GetOpenFilename(FileFilter:="Excel Files, *.xls*", Title:="Please select file for import")
If NewFileName = False Then
MsgBox ("No file selected" & vbCrLf & vbCrLf & "No data has been imported"), vbCritical, "Import Abandoned"
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Exit Sub
End If
' Code to handle input file is here
How do I detect an incorrect password so I can pop up a message and get them to try again?
Thanks