Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vba Help With A Solution


HI THERE IM HAVING TROUBLE PRODUCING SOME VBA CODING IN MICROSOFT EXCE
THAT WILL IMPLIMENT THE FOLLOWING CODE, I WOULD BE GREATFULL IF ANYON
COULD HELP ME ON THIS A.S.A.P BECAUSE I AM NEW TO USING VBA AND FINDIN
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 messag

--
RELWOD8
-----------------------------------------------------------------------
RELWOD85's Profile: http://www.excelforum.com/member.php...fo&userid=2575
View this thread: http://www.excelforum.com/showthread.php?threadid=39163

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Vba Help With A Solution

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Vba Help With A Solution

Hi Relwod,

Change:

Type:=2, _


to

Type:=1, _
---
Regards,
Norman



"Norman Jones" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a solution CA Linda Excel Worksheet Functions 1 July 7th 09 05:31 PM
Looking for a better solution ibvalentine Excel Worksheet Functions 20 November 5th 08 04:49 PM
Web Solution StephenBexcel Excel Discussion (Misc queries) 0 May 13th 08 06:30 PM
looking for a solution Joe Excel Worksheet Functions 1 December 13th 07 04:37 AM
Best Fit Solution Tom Ogilvy Excel Programming 0 August 26th 04 05:34 PM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"