Public Function ConeCalc( _
Optional ByVal vArea As Variant _
, Optional ByVal vDiameter As Variant _
, Optional ByVal vHeight As Variant _
, Optional ByVal vRadius As Variant _
, Optional ByVal vSide As Variant _
, Optional ByVal vVolume As Variant _
) As Variant ConeCalc("CALC", Null, 5, 2, Null, Null) = 33.8359883929281
ConeCalc(vHeight:=5, vRadius:=2, vArea:="CALC") = 33.8359883929281
ConeCalc(vHeight:=3, vSide:=5, vArea:="CALC") = 62.8318530717959
ConeCalc(vHeight:=5, vSide:=3, vArea:="CALC") = "0|37.6991118430776" ' #3
IsNull(ConeCalc(vHeight:=5, vArea:=3, vSide:="CALC")) = True ' #4See also: CylinderCalc FunctionSummary: Two of the arguments should contain a numeric value--the given values for those properties. Pass the word "CALC" to the argument whose value is to be calculated and returned by this function. The other arguments should be missing or Null or non-numeric. Function returns Null if it could not calculate the requested property from the values provided. Otherwise, the function returns the value of the property whose argument was passed the word "CALC".
Note: This function can calculate any property given any of following combinations of properties (property pairs listed in alphabetical order):
Diameter, Side
Height, Diameter
Height, Radius
Height, Side
Radius, SideCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.