Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Populating listbox from network directory

Is it possible to have a listbox on a userform populate with the contents
(names of workbooks) of a network directory? I know it's possible in VB, but
I can't figure out how to do this in VBA.

Thanks, Lee
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Populating listbox from network directory

An example of one way to do it:

Private Sub UserForm_Initialize()
Dim FName As String
FName = Dir("c:\files\*.xls")
While FName < ""
ListBox1.AddItem FName
FName = Dir
Wend
End Sub

--
Jim Rech
Excel MVP
"FinChase" wrote in message
...
| Is it possible to have a listbox on a userform populate with the contents
| (names of workbooks) of a network directory? I know it's possible in VB,
but
| I can't figure out how to do this in VBA.
|
| Thanks, Lee


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
Populating listbox Mick[_2_] Excel Discussion (Misc queries) 1 May 14th 08 10:48 PM
Populating listbox Andy Brown Excel Programming 3 August 16th 04 05:40 PM
Populating a ListBox ToddG Excel Programming 1 June 24th 04 03:18 AM
Populating a userform 3 col listbox Martin[_13_] Excel Programming 0 April 19th 04 09:49 PM
Changing to Network Directory Dan Marr[_2_] Excel Programming 1 August 19th 03 05:56 PM


All times are GMT +1. The time now is 06:15 AM.

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"