Hi Relwod85.
Try something like:
Public Sub Tester()
Dim i As Long
Dim arr As Variant
Dim myVal As Double
Static MyMax As Variant
MyMax = 0
arr = Array("FIRST", "SECOND", "THIRD", "LAST")
For i = 1 To 4
myVal = Application.InputBox( _
prompt:="Please enter a " & _
arr(i - 1) & " number", _
Type:=2, _
Title:="Find Maximum", _
Default:=0)
MyMax = Application.Max(myVal, MyMax)
Next i
MsgBox "Your highest entry was: " & MyMax
End Sub
BTW, Please try to avoid upper case communication: in NG parlance this
equates to shouting and, in any event, is uncommonly difficult to read!
---
Regards,
Norman
"RELWOD85" wrote in
message ...
HI THERE IM HAVING TROUBLE PRODUCING SOME VBA CODING IN MICROSOFT EXCEL
THAT WILL IMPLIMENT THE FOLLOWING CODE, I WOULD BE GREATFULL IF ANYONE
COULD HELP ME ON THIS A.S.A.P BECAUSE I AM NEW TO USING VBA AND FINDING
IT ALL VERY CONFUSING undefined
SET maximum value=0
LOOP
INPUT a score between 1-10
IF the maximum value is smaller than the input score
SET maximum value=input score
END IF
END LOOP(repeat 4 times)
DISPLAY the maximum value with a suitable message
--
RELWOD85
------------------------------------------------------------------------
RELWOD85's Profile:
http://www.excelforum.com/member.php...o&userid=25753
View this thread: http://www.excelforum.com/showthread...hreadid=391632