scarlet1978
Technical User
Hi everyone,
I have just composed a module in Access that consists of various functions. These functions use Excel to perform various calculations.
It works fine when I calculate it for a given set of input variables, however what I want to do is get the functions to perform these calculations for a whole table, where the table provides all of the input variables.
In the following example I want to calculate x for each row in a table, where the inputs (8, 2, 10) are the columns in the table.
Can anyone help?
Example:
Sub LogNormalDist()
Dim objExcel As Excel.Application
Dim x As Double
Set objExcel = CreateObject("Excel.Application")
x = LognormMoments(50000, 8, 2)
objExcel.Quit
Set objExcel = Nothing
End Sub
I have just composed a module in Access that consists of various functions. These functions use Excel to perform various calculations.
It works fine when I calculate it for a given set of input variables, however what I want to do is get the functions to perform these calculations for a whole table, where the table provides all of the input variables.
In the following example I want to calculate x for each row in a table, where the inputs (8, 2, 10) are the columns in the table.
Can anyone help?
Example:
Sub LogNormalDist()
Dim objExcel As Excel.Application
Dim x As Double
Set objExcel = CreateObject("Excel.Application")
x = LognormMoments(50000, 8, 2)
objExcel.Quit
Set objExcel = Nothing
End Sub