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!
Book1.xlsm
jcgrooveAsked:
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.

Wilder1626Commented:
Hi

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

0

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:  http://www.wiseowl.co.uk/blog/s209/type-filedialog.htm

Function SelectFiles(ByRef test As String)
    Dim iFileSelect As FileDialog
    Set iFileSelect = Application.FileDialog(msoFileDialogOpen)
    With iFileSelect
        .AllowMultiSelect = False
        .Title = "Select TXT Files"
        .Filters.Clear
        .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

~bp
0
jcgrooveAuthor Commented:
Both of those methods work. I was hoping for a shell application version. Any ideas?
0
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.

~bp
0
jcgrooveAuthor Commented:
I don't have a problem with this. I just wish I'd been able to get a more specific solution.
0
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.
0
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.