**Public Function CubeCalc( _
Optional ByVal vArea As Variant _
, Optional ByVal vDiagonal As Variant _
, Optional ByVal vSide As Variant _
, Optional ByVal vVolume As Variant _
) As Variant**

**"Cube Calculator" **

Calculate some property about cubes given the value of some other property.

**Examples:** CubeCalc(Null, Null, 10, "CALC") = 1000
CubeCalc(vSide:=10, vVolume:="CALC") = 1000
CubeCalc(vDiagonal:=10, vVolume:="CALC") = 192.450089729875
CubeCalc(vDiagonal:=10, vSide:="CALC") = 5.77350269189626

**See also:** SquareCalc Function

**Summary:** One of the arguments should contain a numeric value--the given value for that property. 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 none of the arguments can be fixed up to a real or complex number (as defined by the IsComplex function). Otherwise, the function returns the value of the property whose argument was passed the word "CALC".

**vArea:** Area of the cube.

**vDiagonal:** Length of the diagonal line between any two opposing corners.

**vSide:** Length of any side of the cube.

**vVolume:** Volume of the cube.

**Note:** Function may return a complex number in the form of a string if the given dimensions are not consistent with the shape.

**Note:** The match on the word "CALC" is case-insensitive, so for example, "CALC" and "Calc" match each other. Copyright 1996-1999 Entisoft

Entisoft Tools is a trademark of Entisoft.