LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default List box question

Hello all

I need a little help please....

The following code populates a single column listbox on a
form with the files contained in a directory

Private Sub UserForm_Initialize()

Dim fs, f, f1, fc, S
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder("X:\")
Set fc = f.Files

ListBox1.ColumnCount = 1
ItemCount = 0
ItemTitle = 2

For Each f1 In fc

ListBox1.AddItem f1.Name

Next
End Sub


The idea is for the user to choose a file on which to
perform some work.

The problem?...the user does not always know the content
of the file. The file name is a string made up from the
date and time the file was created e.g. 121603_1542.xls

I want to add a second column in the list box which will
display some of the property attributes of the file e.g.
the title or the subject. The title/subject, or whatever
property I can access, can be used to hold a string which
shows the user some of the details of the file content
(for example the date range of the data it contains)

Can anyone help with the code to populate that second
column....or other suggestion to acheive my aim.

Appreciate any help.

Regards

Michael Bond
 
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
List or Combo Box Question dhstein Excel Discussion (Misc queries) 1 June 14th 09 06:30 AM
List Question metaltecks Excel Discussion (Misc queries) 5 August 17th 06 04:51 PM
Combo box list question tanner g Excel Discussion (Misc queries) 1 April 21st 05 08:59 AM
List Box Question Nick Excel Discussion (Misc queries) 1 March 28th 05 06:42 PM
drop down list question [email protected] Excel Discussion (Misc queries) 1 January 20th 05 06:53 PM


All times are GMT +1. The time now is 04:39 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"