application.quit 
Author Message
 application.quit

I am using a scheduled task to open an excel spreadsheet
every morning.Using the Auto_open feature I run the code
below. The problem is that the workbook closes but excel
does not.The sched task then becomes hung and doesnt run
more than once. Any ideas.

Thanks,
jt

Sub Auto_Open()
'
' Auto_Open Macro
' Macro recorded 1/30/2002 by wardlj
'

'
    Application.EnableEvents = True
    Application.DisplayAlerts = False
    Calculate
    Application.Goto
Reference:="Query_from_PM3_Standardize"
    Selection.QueryTable.Refresh BackgroundQuery:=False
    Calculate
    Application.ActivePrinter = "\\RRNTPRT1\BmlOffLJ4000
on Ne02:"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:= _
        "\\RRNTPRT1\BmlOffLJ4000 on Ne02:", Collate:=True
    Workbooks("New PM3 Standardize Data.xls").Close
SaveChanges:=True
    Application.Quit

 End Sub
.



Sat, 31 Jul 2004 00:18:34 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Disable Application Quit ("X") Button

2. Newbie Application.Quit Question

3. Acc97: Application.Quit hangs task

4. Application.Quit statement resets Variables?

5. Access 97 - Application.Quit does not work if msgbox is displayed

6. objWord.Application.Quit crashes Word97

7. Repost -- ACC97: GPF on Application.Quit

8. Detecting application quit

9. ACC97: GPF on Application.Quit (and shutdown problem)...

10. Timed application quit/start

11. Newbie Application.Quit Question

12. Out of Memory error with Application.Quit method

 

 
Powered by phpBB® Forum Software