Shell application file picker doesn't accept txt files

Attached is a workbook that has a function for picking files. For some reason, it doesn't work with txt files and I really need it to. Please help!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Is that what you are looking for?
    Dim fileName
    fileName = Application.GetOpenFilename("Text Files (*.txt),*.txt")

    If fileName <> "False" Then
        Workbooks.Open fileName, Format:=2
    End If

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bill PrewIT / Software Engineering ConsultantCommented:
If you want to select a file you want to use something like below.  Some good info her:

Function SelectFiles(ByRef test As String)
    Dim iFileSelect As FileDialog
    Set iFileSelect = Application.FileDialog(msoFileDialogOpen)
    With iFileSelect
        .AllowMultiSelect = False
        .Title = "Select TXT Files"
        .Filters.Add "Text Files", "*.txt"
        .InitialView = msoFileDialogViewDetails
        If .Show = -1 Then
            Dim vrtSelectedItem
            For Each vrtSelectedItem In iFileSelect.SelectedItems
                SelectFiles = vrtSelectedItem
            Next vrtSelectedItem
        End If
    End With
    Set iFileSelect = Nothing
End Function

Open in new window

jcgrooveAuthor Commented:
Both of those methods work. I was hoping for a shell application version. Any ideas?
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

Bill PrewIT / Software Engineering ConsultantCommented:
I don't think it's possible with shell.application, but maybe someones knows a trick.

jcgrooveAuthor Commented:
I don't have a problem with this. I just wish I'd been able to get a more specific solution.
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.