Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
List or Combo Box Question | Excel Discussion (Misc queries) | |||
List Question | Excel Discussion (Misc queries) | |||
Combo box list question | Excel Discussion (Misc queries) | |||
List Box Question | Excel Discussion (Misc queries) | |||
drop down list question | Excel Discussion (Misc queries) |