I am using the standard Windows task scheduler to open an excel file and on quitting the application the scheduler still shows the task as "running".
I have simplified the code right down and continue to get the problem.

Private Sub Workbook_Open()
    If Dir("D:\ExcelTest\go.txt") = "" Then Stop 'just allows me to stop the code if I want to
    
''    Macro1
    DoEvents
    Application.Quit
End Sub
Any ideas? (and the go.txt file does exist)