graceful exits
This code is used to find and open text files to import into a worksheet.
' Get the file name
Dim FName As Variant
FName = Application.GetOpenFilename("Excel file (*.txt),*.txt)")
If FName = False Then
MsgBox "No file selected"
Else
MsgBox "You chose: " & FName
End If
In the False section I want to add in a line to simply exit the macro. The
functionality I need is:
MsgBox "No file selected"
Exit_Macro
What is the code to exit the macro here?
|