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?
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 PrewCommented:
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?
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Bill PrewCommented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.