Solved

Fill ListBox with File Names given Path

Posted on 1999-01-13
1
156 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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

771 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

11 Experts available now in Live!

Get 1:1 Help Now