I have a directory with several TXT files. Let them talk
hi.txt hello.txt hello_test.txt test.txt
Using the file dialog in VBA, how can I filter to show only "* test.txt" the relevant files (ie the last two) in the drop-down list? Or I can use only *. filters?
The following seems to work, but does not:
Sub TestIt() Dim test As Variant 'silly vba for not having a return type.. test = Application.GetOpenFilename(FileFilter:="test (*test.txt), *test.txt") End Sub
edit: clarification in case this is unclear: I want to filter "test.txt" instead of ".txt" files, so I can only choose from hello_test.txt and test.txt in chooser.
source share