Solved

how to get highest number of listbox ?

Posted on 2008-10-28
1
272 Views
Last Modified: 2012-05-05
I have a listbox and i have numbers added into it (only numbers) ... how can i determine highest number in that list containing numbers?
0
Comment
Question by:BILAL69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
Adel87 earned 500 total points
ID: 22820848
Hi,

The attached code should do the trick.

Please reply if you need further assistance.

Regards,
Dim max As Double
For x = 0 To List1.ListCount - 1
If List1.List(x) > max Then
max = List1.List(x)
End If
Next
MsgBox "The highist number is : " & max

Open in new window

0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question