PDA

View Full Version : Return Max Value



The"Truth"
11-12-2008, 09:29 AM
On a User form I am trying to get a lable to return the max value from 10 other lables. Is this possible?

Bob Phillips
11-12-2008, 09:43 AM
Only by brute force



Label1.Caption = Textbox1.Text
If Val(TextBox2.Text) > Val(Label1.Caption) Then Label1.Caption = Textbox2.Text
'etc.

The"Truth"
11-12-2008, 10:41 AM
I may have confused some people. I ment to say label vs. labelBox. Does this matter.

Bob Phillips
11-12-2008, 11:05 AM
No, just tweak it to match



LabelMax.Caption = Label1.Caption
If Val(Label2.Caption) > Val(Label1.Caption) Then LabelMax.Caption = Label2.Caption
'etc.