Solved

Fill ListBox with File Names given Path

Posted on 1999-01-13
1
157 Views
Last Modified: 2010-05-03
I need to fill a Listbox with the Names of Files in a Directory. I want code, I dont want to use a filelistbox.
0
Comment
Question by:fred12
1 Comment
 
LVL 1

Accepted Solution

by:
OeilNoir earned 100 total points
ID: 1456085
this will do what you want... when you call the "dir" function without parameters, the dir function return the next file matching the patern....

dim strFile as string

strfile = dir("c:\path\*.*")
do while strfile <> ""
   list1.additem strfile
   strfile = dir
loop
   
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

947 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

19 Experts available now in Live!

Get 1:1 Help Now