Thanks Jeff for your reply. I am sure it is pointing me in the right direction. However, I am having difficulty with defining the function properly I beleve . It must be an array function to Calculate percentiles using the Excel PERCENTILE function. Then I have to access it in an EXCEL query. Apparently I don't make it a totals query, for then it only expects the standard aggregate fucntions in ACCESS.
However, I am not sure how the function I create will work otherwise.
Below is my attempt at VB code per your example:
Dim Xcel As Excel.Application
Dim PrcntlDblArray(100)
Prcntl10 = Xcel.WorksheetFunctions.Percentile
(ParamArray PrcntlDblArray(), 10)
VB doesn't like the ParamArray command. I have tried leaving it out but then I get an error when trying to use the function in an Access query.
If you can provide any more guidance, it would be appeciated.
Thanks.