View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Populate listBox

Dim sPath as String
Dim sFname as String
sPath = "C:\Myfolder\*.xls"
sFname = Dir(sPath)
Do while sFname < ""
Listbox1.AddItem sFname
sFName = dir()
Loop

--
Regards,
Tom Ogilvy

"Hamster" wrote in message
...
Hi All

How do I go about populating a listbox. with file names from a directory.

I
can do this in VB but can't find anything in excel


thank you
Phill