|
-
Nov 27th, 2000, 03:40 PM
#1
Thread Starter
Lively Member
EASY EASY EASY but I am a novice!
I have an array of long numbers. I need to find the maximum value of this array
Here is the info:
dim lngMyNumb() as long
dim i as integer
i =3
redim lngmynumb(i)
lngmynumb(0) = 1
lngmynumb(1) = 2
lngmynumb(2) = 3
lngmynumb(3) = 4
I need something like Max(lngMyNumb(i))
Help!!!! Max(lngMyNumb(i)) doesn't work.
-
Nov 27th, 2000, 03:53 PM
#2
Dim lngMyNumb() As Long
Dim lngMax As Long
Dim i As Integer
i = 3
ReDim lngMyNumb(i)
lngMyNumb(0) = 44
lngMyNumb(1) = 66
lngMyNumb(2) = 99999
lngMyNumb(3) = 123
For i = 0 To UBound(lngMyNumb)
If lngMyNumb(i) > lngMax Then
lngMax = lngMyNumb(i)
End If
Next
MsgBox "Max is " & lngMax
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
|