M
Murali
Hi
I have to use excel's SERIESSUM function in Access VBA.
My line of code is
Dim oFunctions As MSOWCFLib.OCAT
Set oFunctions = New MSOWCFLib.OCAT
intSeriesSumBU = oFunctions.SERIESSUM((wExcl.Worksheets(1).Range("F" & i).Value - wExcl.Worksheets(1).Range("P" & i).Value), 1, 1, wExcl.Worksheets(1).Range("F" & i).Value * 2 - (wExcl.Worksheets(1).Range("F" & i).Value - wExcl.Worksheets(1).Range("P" & i).Value - 1)
But I get the error "Run time error 424 -- Object Required".
For testing the above.. I just gave the following
dim intSeriesSumB
intSeriesSumBU = oFunctions.SERIESSUM(48, 1, 1, 49
msgbox (intSeriesSumBU
Giving this code gives me a "complie error -- Type Mismatch" error... But when I put this piece of code "=SERIESSUM(48, 1, 1, 49)" in an excell cell, it works fine..
Can anyone tell me the solution to this... I need this urgently and need to call this function from Access only... Please help me..
Thanks and Regards
Murali
I have to use excel's SERIESSUM function in Access VBA.
My line of code is
Dim oFunctions As MSOWCFLib.OCAT
Set oFunctions = New MSOWCFLib.OCAT
intSeriesSumBU = oFunctions.SERIESSUM((wExcl.Worksheets(1).Range("F" & i).Value - wExcl.Worksheets(1).Range("P" & i).Value), 1, 1, wExcl.Worksheets(1).Range("F" & i).Value * 2 - (wExcl.Worksheets(1).Range("F" & i).Value - wExcl.Worksheets(1).Range("P" & i).Value - 1)
But I get the error "Run time error 424 -- Object Required".
For testing the above.. I just gave the following
dim intSeriesSumB
intSeriesSumBU = oFunctions.SERIESSUM(48, 1, 1, 49
msgbox (intSeriesSumBU
Giving this code gives me a "complie error -- Type Mismatch" error... But when I put this piece of code "=SERIESSUM(48, 1, 1, 49)" in an excell cell, it works fine..
Can anyone tell me the solution to this... I need this urgently and need to call this function from Access only... Please help me..
Thanks and Regards
Murali