Filter names of files to list using VB6

Posted on 2013-10-28
Last Modified: 2013-10-30
In VB6 I using a ListFileBox to display specific files that meet this criteria.

File name start with Playbookxxxxx*.mdb
where xxxxxx can be any text.



What character do I use for xxxxxx?
Question by:slwebber99
LVL 15

Accepted Solution

eemit earned 50 total points
ID: 39613241
What is wrong with:

Private Sub Form_Load()
  Dir1.Path = "C:\DirWithYourFiles\"
  File1.FileName = "Playbook*.mdb"	'or File1.Pattern = "Playbook*.mdb"
End Sub

Private Sub Dir1_Change()
  File1.Path = Dir1.Path
End Sub

Open in new window


Author Closing Comment

ID: 39613339
That was too easy. Thanks.

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now