If you already had an array containing file names you could say NumberOfFiles =
Ubound(ArraysName) If not, just place a file list box on your form. It looks
like a white sheet of paper with one corner turned down, on your tool bar. Set
its properties to the directory you want either using the properties, or at
runtime. Now you can refer to anything in it the same as any other list box.
For example, NumberOfFiles = File1.ListCount. You could fetch the contents of
a directory into an array by saying, for instance,
Dim filename(1000)
Private Sub Form_Load()
For x = 0 To File1.ListCount - 1
filename(x) = File1.List(x)
Next
End Sub
HouseDad <[EMAIL PROTECTED]> wrote:
I am finally getting around to using some code you guys gave me a
while back to handle multiple file selection. The way it works is it
loads an array that is declared like "array()". My question is, is
there a property or way to tell how many values are in the array or
do I have to trap an error?
What will happen, hopefully, all the selected filenames will be
loaded and then I will have to use some kind of loop to read the
values incrementally until the last one has been read.
Chris
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [email protected]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'
[Non-text portions of this message have been removed]
'// =======================================================
Rules : http://ReliableAnswers.com/List/Rules.asp
Home : http://groups.yahoo.com/group/vbHelp/
=======================================================
Post : [email protected]
Join : [EMAIL PROTECTED]
Leave : [EMAIL PROTECTED]
'// =======================================================
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/