?
Solved

FileListBox.Pattern = "*.xls, *.jpg" not working correctly

Posted on 2007-10-21
5
Medium Priority
?
2,728 Views
Last Modified: 2013-11-25
I have a program that is to filter the files in the list for both *.xls and *.jpg.
when i add in
FileListBox.Pattern="*.XLS; *.JPG"
i get only XLS
and vicacersa if i switch the ordering of the extensions.
please let me know fi there is an issue with this
0
Comment
Question by:mrb121212
5 Comments
 
LVL 8

Expert Comment

by:Wikkard
ID: 20119981
You need to include both text to be displayed in the dropdown and the underlying file filter mask.
eg Log Files (*.log)|*.log|All Files (*.*)|*.*

Use the pipe | character to serate them as shown above.
0
 

Author Comment

by:mrb121212
ID: 20120196
Hi Wikkard,
The use of pipe in the FileListBox.Pattern results in no items being shown.
that sounds like a SaveFileDialog or OpenFileDialog that you are talking about.
 please revise.
thanks
0
 

Author Comment

by:mrb121212
ID: 20122506
i guess, i should re-state the following:
the program needs to filter the files in the fileslistbox for *both* JPG and XLS extensions.
0
 
LVL 1

Accepted Solution

by:
oytun12 earned 2000 total points
ID: 20179977
the fix is to remove the space in the pattern string like so:
FileListBox.Pattern="*.XLS;*.JPG"
that should fix it.
0
 

Expert Comment

by:fantamen
ID: 34082932
oytun12 your answer is usefull for me too.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

749 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