Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Populate listBox

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
populate ldropdown listbox from a dbf. file niteman27 Excel Discussion (Misc queries) 0 December 1st 08 10:57 PM
Array to Populate ListBox Problem pallaver Excel Discussion (Misc queries) 1 July 25th 08 08:50 AM
listbox B conditional of input in Listbox A Kim K Excel Discussion (Misc queries) 1 October 31st 06 08:27 PM
ListBox Populate Rod Taylor Excel Programming 3 July 22nd 03 12:11 AM
Sorting ListBox results or transposing ListBox values to other cells for sorting Rob[_8_] Excel Programming 1 July 9th 03 04:35 AM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"