Don't try and close the workbook first, use a statement to save it if necessary and then just use: -
Application.Quit
XL2000user:
I would to use a macro to close its workbook and then shut down XL.
The script below is what I was trying. Each statement runs by itself, but together the macro stops after the worksheet closes. The ap does not shut down.
???
Todd
Don't try and close the workbook first, use a statement to save it if necessary and then just use: -
Application.Quit
Could you post the code?On 2002-03-04 12:06, ToddMc wrote:
XL2000user:
I would to use a macro to close its workbook and then shut down XL.
The script below is what I was trying. Each statement runs by itself, but together the macro stops after the worksheet closes. The ap does not shut down.
???
Todd
but, you might try putting the:
Application.Quit
in the Workbook_BeforeClose i.e:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Quit
End Sub
Any help?
"Have a good time......all the time"
Ian Mac
This is the script I was supposed to attach
Private Sub Workbook_Open()
Call Import '(macro name)
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Quit
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Quit
End Sub
works for me??
"Have a good time......all the time"
Ian Mac
This works but the SaveChanges=False doesn't seem to work. Any suggestions?On 2002-03-04 12:49, Ian Mac wrote:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Quit
End Sub
works for me??
Private Sub Workbook_Open()
Call Import
Me.Close SaveChanges = False
Application.Quit
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Quit
End Sub
Like this thread? Share it with others