Filtering on files - comdlg32.ocx

Hi I have made a minor modification on C412 which allows the user to browse a folder specified. Is there any (easy) way) to put a filter on the files, making it possible only to show files with the phrase ‘phrase’ in the title, say? Jens

I am not sure exactly where and how you are doing this, but… normally you can suggest a file name, and you can put wildcards in that name. normally it wouyld be “.TXT", but I have put thinkgs like "Import.CSV”.

The Filter property is what you want: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmdlg98/html/vbproFilter.asp Also, if the dialog is a Save As dialog, set the DefaultExt property to something like “.txt”, so if the user entered “abc” it would save it as “abc.txt”, not just “abc”. While testing, turn off “Hide extension for known file types” in Folder Options in Windows Explorer, so you can see the full file name. DefaultExt property: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmdlg98/html/vbprodefaultext.asp More about the CommonDialog Control: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmdlg98/html/vbproFilter.asp