Calling function.ets with VBA from ms-access

Tom Koel
Occasional Visitor

I'm having a terrible time figuring this out.  Im trying to call Excel's function.ets function from an ms-access module.  I can call other functions without a problem.  I've got the arrays filled up and I've tried it a million ways, always with the same answer - "VBA Error 1004 Invalid number of arguments."


I've tried -

    forecastBackVar = objectVar.WorksheetFunction.Forecast.ets(testNowDate, testPointsARRAY, testDateARRAY, 0, 1, 5)
    forecastBackVar = objectVar.WorksheetFunction.Forecast.ets(testNowDate, Array(testPointsARRAY), Array(testDateARRAY), 0, 1, 5)
    forecastBackVar = objectVar.WorksheetFunction.Forecast.ets(Arg1:=testNowDate, Arg2:=testPointsARRAY, Arg3:=testDateARRAY, Arg4:=0, Arg5:=1, Arg6:=5)

    forecastBackVar = objectVar.WorksheetFunction.Forecast.ets()
    Someone suggested I try Forecast_ETS, and I got this back - "VBA Error 1004 Unable to get the Forecast_ETS property of the WorksheetFunction class."




1 Reply

I am having the same issue, When I was trying out different combinations for the various non-default parameters, at just one point it worked, but when I manually refactored my code, it no longer works. Can't seem to remember what combinations worked. This post may not be useful as an answer, but trying to add weight for this problem to gain traction.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies