Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The filter of common Dialog

Status
Not open for further replies.

kruxty

Programmer
Jul 17, 2001
197
0
0
PT
what is the syntax of the function filter of CommonDialog?
 
Just use the following (or something similar):

Dim filtertext As String
filtertext = "Whatever filter you want to use"
CommonDialog1.Filter = filtertext

You can find the syntax in the Language (or Controls?) Reference or on MSDN.
 
My problem is how to use the filtertext :p
 
The common dialog filter is written as one string that has two parts to it that are separeted by a vertical line character. The string expression

Any Access Database|*.mdb

causes the phrase "Any Access Database" (the part to the left of the "|") to appears as a prompt in the common dialog control at run-time, the phrase "*.mdb" (the part to the right of the "|") is the actual filter that would cause only files with [any filename and an extension of "mdb"] to appear as selectable files from whatever directory/folder has focus at run-time.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top