LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Best Way to Get File Names into UserForm

Many thanks, your way is a million times faster than Filesearch, and it
solves my problem.

Stratuser


"Vergel Adriano" wrote:

Stratuser,

give this a try:

Dim strFile As String
strFile = Dir("D:\TEMP\*.XLS")
While strFile < ""
ListBox1.AddItem strFile
strFile = Dir
Wend



--
Hope that helps.

Vergel Adriano


"Stratuser" wrote:

I have a userform that uses the filesearch command to get 132 filenames from
a subdirectory and put them into a listbox that I pick the filenames from.
The filesearch command is way too slow --- taking 30 seconds every time ---
so I'm looking for a more efficient way. Any ideas?

 
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
Listing Userform Names Nigel RS[_2_] Excel Programming 9 October 12th 06 07:38 AM
Renamed EditBoxes keep reverting to their old names in UserForm Peter Rooney Excel Programming 4 August 16th 05 08:57 AM
Populating Userform ComboBox with worksheet names in XL2003 MAWII Excel Programming 0 August 9th 05 09:07 PM
Populate Excel Userform with Sheet names PC[_3_] Excel Programming 2 February 16th 05 02:15 PM
How To Get A List Of Names To Appear In A TextBox On A UserForm Minitman[_4_] Excel Programming 0 October 21st 04 05:12 PM


All times are GMT +1. The time now is 12:38 PM.

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

About Us

"It's about Microsoft Excel"