When I am active in the workbook and run the macro with the regression it works perfectly. However, when I try to run the macro through task scheduler or a vbs script automatically, I always get the following error: run time error 1004, run method of '_Application' failed.
I check and the Analysis Toolpak - VBA is enabled and I even have code in my macro to enable it if it's not already enabled. I also have to the Reference added as well that has to do with regression.
This only happens when I try to trigger the macro with task scheduler or something like that. I've tried so many things that just don't seem to work. The code that errors out is below:
Is there any way to get a macro with regression to run through task scheduler without getting this run time error? Or is there another way I can do the regression without using the toolpak?
Bookmarks