CodePudding user response:
To create Excel Application object, then call WorksheetFunction support function through it, So easy...'reference code (sample only passed four parameters, these functions are actually support "of" a number of parameters) :
Private Sub Command1_Click ()
Dim objExcelApp As Object
The Set objExcelApp=CreateObject (" Excel. Application ")
Me. Print "parameters passed: 2, 5, 15, 3"
Me. Print a maximum value: "" & amp; ObjExcelApp. WorksheetFunction. Max (2, 5, 15, 3)
Me. Print a minimum value: "" & amp; ObjExcelApp. WorksheetFunction. Min (2, 5, 15, 3)
Me. Print "summation:" & amp; ObjExcelApp. WorksheetFunction. Sum (2, 5, 15, 3)
Me. Print "mean:" & amp; ObjExcelApp. WorksheetFunction. Business, (2, 5, 15, 3)
The Set objExcelApp=Nothing
End Sub
CodePudding user response:
This a few function to write their own than excel around a circle inside all convenientCodePudding user response: