Dale and Lanny,
Is this what you are referring to?
Public oExcel As New Excel.Application
Public Sub DoesThisWork()
Debug.Print oExcel.WorksheetFunction.Max(12, 13, 2, 1, 0, 42)
End Sub
Don't forget to set your reference to Excel.
--
Get on the emailing list for notification of the NEW "AutoCAD Visual Basic
Programmers Reference" - the ultimate guide to Visual Basic programming for
R14/2000/2000i
and 2002 by clicking on the link below
mailto:omnisource@worldnet.att.net?subject=NewVBTitle
Joe Sutphin
Author of "AutoCAD 2000 VBA Programmers Reference"
ISBN #1861002564
"Lanny Schiele" wrote in message
news:682BA3B8C4D8F0956B7CF9F65DC6CEDA@in.WebX.maYIadrTaRb...
> ... nope -- hafta write'em -- (lisp has them -- funny why VBA doesn't):
>
> Syntax for all four functions below:
>
> Minimum(1,2,5,6,3,etc...)
> Min(Array)
> Maximum(1,2,5,6,3,etc...)
> Max(Array)
>
> '================================== watch for word wrap
>
> Public Function Minimum(ParamArray Numbers())
> Minimum = Min(Numbers)
> End Function
>
> Public Function Maximum(ParamArray Numbers())
> Maximum = Max(Numbers)
> End Function
>
> 'Send back the minimum value from a list of numbers
> Public Function Min(ByVal NumericArray As Variant) As Variant
> Dim i As Integer
> Dim MinVal As Double
> Dim CurVal As Double
> CurVal = NumericArray(0)
> MinVal = CurVal
> For i = LBound(NumericArray) + 1 To UBound(NumericArray)
> CurVal = NumericArray(i)
> If CurVal < MinVal Then MinVal = CurVal
> Next
> Min = MinVal
> End Function
>
> 'Send back the maximum value from a list of numbers
> Public Function Max(ByVal NumericArray As Variant) As Variant
> Dim i As Integer
> Dim MaxVal As Double
> Dim CurVal As Double
> CurVal = NumericArray(0)
> MaxVal = CurVal
> For i = LBound(NumericArray) + 1 To UBound(NumericArray)
> CurVal = NumericArray(i)
> If CurVal > MaxVal Then MaxVal = CurVal
> Next
> Max = MaxVal
> End Function
>
>
>
>