|
-
Sep 21st, 2000, 08:44 AM
#1
Thread Starter
Addicted Member
Can someone tell me how to write a loop to count the number of files in an array??
-
Sep 21st, 2000, 08:47 AM
#2
Fanatic Member
Good news...
Kanejone. You can use the Ubound Function to get the number of files without having to loop through the array.
Code:
lFilesCount = (Ubound(YourFilesArray) + 1)
All the best.
-
Sep 21st, 2000, 08:53 AM
#3
_______
<?>
you don't need a loop if they are in an array
file count would be
msgbox "My file count = " & uBound(myArray)-1
'minus 1 as arrays are zero based
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 21st, 2000, 09:08 AM
#4
Fanatic Member
HeSaidJoe,
'minus 1 as arrays are zero based
wouldn't you need to add 1 because of this to get the file count? For example if the array contained 2 files, subtracting 1 from UBound would give a file count of 0, whereas adding 1 would give a file count of 2.
All the best.
-
Sep 21st, 2000, 09:29 AM
#5
_______
<?>
Your're right (Add 1)
..it's those cheap drugs..
Gotta get a raise so I can get better ones.
LOL
Later
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 21st, 2000, 10:05 AM
#6
Fanatic Member
HeSaidJoe
Maybe you should lay off of the drugs for a while!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|