|
-
May 5th, 2000, 02:27 AM
#1
i know len() will do it...but how do you..
i have five strings, eg:
and i assign the lengths to a
string array, eg:
tmp(0) = len(string1)
tmp(1) = len(string2)
...
...
tmp(4) = len(string5)
is there an easier (hah!) way
to find the longest string other
than comparing it to each other
many times?
thanks for all help in advance,
**update**
thanks to all...
Fox,
i used your code with a slight
addition to recall the index of
the longest string
Dim A as Long
Dim Temp as Long
dim i as integer 'for index
For A = 0 to 4
If Len( Text(a) ) > Temp Then
Temp = Len( Text(a) )
i = A 'to recall index of longest string
Endif
Next
[Edited by larryn on 05-11-2000 at 10:31 AM]
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
|