troubleshooting Question

Scheduled task errors out, but opening excel does?

Avatar of iamnamja
iamnamja asked on
Microsoft ExcelMicrosoft ApplicationsMicrosoft Development
2 Comments1 Solution259 ViewsLast Modified:
Hi,

I have a macro in Excel set to auto run through the windows scheduler.  The macro seems to run fine when I run it by opening it manually (it envokes the macro through open workbook)

But when I run it from the scheduler, I get the following error:
XXXXX.xlsm is already open.  Reopening will cause any changes you made to be discarded.  Do you want to reopen XXXXX.xlsm?

I tried to identify where the error is...  and it seems to occur when I call a function by doing application.ontime in the macro.

I do this because I'm running the macro in bloomberg, and I need a way to "let go" of the macro, and keep checking to see if the values are populated... And when they are, it will call another function to complete the macro and close out the excel sheet.

Any idea how I can go about fixing this?  I need this to run automatically, but this is stalling the macro.  Possibly there's another way to run this similar to opening the sheet manually?  Thanks!
ASKER CERTIFIED SOLUTION
redmondb

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros