Solved

Max Value

Posted on 2004-09-27
1
171 Views
Last Modified: 2010-05-02
How to find max value in selected range in VB code, also give some other ifo about statistical functions or statements or proerties I can use in Vb programming. like, average, standered deviation etc...
0
Comment
Question by:skpd1978
1 Comment
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 12164734
Using Application.WorksheetFunction you can use almost any function you could on a worksheet from within VB code:

    Public Sub foo()
        maxValue = Application.WorksheetFunction.Max(Worksheets("Sheet1").Range(Cells(1, 1), Cells(5, 3)))
        MsgBox maxValue
    End Sub

~IM
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 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