GetOpenFilename

S

Steven

FName = Application.GetOpenFilename(filefilter:="Excel Files (*.xls), *.xls")
If FName <> False Then
Set WB = Workbooks.Open(FName)
Else
Exit Sub
End If

I thought if I hit the Cancel key it would take me to Exit Sub in this case
but that is not the case. How do I catch the Cancel key.

Thank you,

Jimmy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top