Open a text file using a dialog box

B

BRG

I have used the following code to allow a user to browse and select an excel
file to open in the past:

FOpen = Application.Dialogs(xlDialogOpen).Show(ThisWorkbook.Path)

I am now trying to use the same method to open a text file, using the
following code:

FOpen = Application.Dialogs(xlDialogOpenText).Show(ThisWorkbook.Path)

This doesn't seem to work. What am I doing wrong?
 

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