Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dialog filter

Posted on 1998-11-30
2
Medium Priority
?
232 Views
Last Modified: 2010-05-03
dlgDialog.Filter = "gif (*.gif)|*.gif;jpg(*.jpg)|*.jpg"
dlgDialog.ShowOpen

Why Does this only filter the .gif files, how can I filter the .jpg files as well, and how do I do the "all files"?
0
Comment
Question by:slobstar
2 Comments
 
LVL 2

Accepted Solution

by:
dm_14 earned 80 total points
ID: 1447393
1. Start a new project
2. in form1 place one command button
3. place the common dialog control on the form
4. in the command button click event place the following code :

    ' Set Filter
    CommonDialog1.Filter = "All Files (*.*)|*.*|JPEG Files (*.jpg)|*.jpg|Gif Files (*.gif)|*.gif| Gif & JPEG Files |*.gif;*.jpg"
    ' Specify default filter.
    CommonDialog1.FilterIndex = 2

    ' Display the Open dialog box.
    CommonDialog1.ShowOpen

0
 
LVL 1

Author Comment

by:slobstar
ID: 1447394
Thanks!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question