Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel Completely
Private Sub CommandButton1_Click()
MsgBox "Please Call In" ActiveWorkbook.Save Application.Quit End Sub "David W" wrote in message ... How do I get excel to close all the way out I got this code to almost to do it but it don't Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save ActiveWorkbook.Close End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel Completely
Most have seemed to suggest
Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save ActiveWorkbook.Close Application.Quit End Sub This won't work. the code stops execution after the ActiveWorkbook.Close (since this is a commandbutton, the workbook with the code will be the activeworkbook). John Wilson cleverly suggests you **can** replace Activeworkbook.Close with Application.Quit - no option here - you must if you want the application to end. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save Application.Quit End Sub "David W" wrote in message ... How do I get excel to close all the way out I got this code to almost to do it but it don't Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save ActiveWorkbook.Close End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel Completely
Tom,
John Wilson cleverly suggests you **can** replace Activeworkbook.Close with Application.Quit - no option here - you must if you want the application to end. Knew that. Obviously didn't state my case very well in my post. As long as you're on-line, can you give an assist with another post in this group? July 9th, recalc question, Bura Tino Thanks, John Tom Ogilvy wrote: Most have seemed to suggest Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save ActiveWorkbook.Close Application.Quit End Sub This won't work. the code stops execution after the ActiveWorkbook.Close (since this is a commandbutton, the workbook with the code will be the activeworkbook). John Wilson cleverly suggests you **can** replace Activeworkbook.Close with Application.Quit - no option here - you must if you want the application to end. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save Application.Quit End Sub "David W" wrote in message ... How do I get excel to close all the way out I got this code to almost to do it but it don't Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save ActiveWorkbook.Close End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Closing Excel Completely
Done
Regards, Tom Ogilvy "John Wilson" wrote in message ... Tom, John Wilson cleverly suggests you **can** replace Activeworkbook.Close with Application.Quit - no option here - you must if you want the application to end. Knew that. Obviously didn't state my case very well in my post. As long as you're on-line, can you give an assist with another post in this group? July 9th, recalc question, Bura Tino Thanks, John Tom Ogilvy wrote: Most have seemed to suggest Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save ActiveWorkbook.Close Application.Quit End Sub This won't work. the code stops execution after the ActiveWorkbook.Close (since this is a commandbutton, the workbook with the code will be the activeworkbook). John Wilson cleverly suggests you **can** replace Activeworkbook.Close with Application.Quit - no option here - you must if you want the application to end. -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save Application.Quit End Sub "David W" wrote in message ... How do I get excel to close all the way out I got this code to almost to do it but it don't Private Sub CommandButton1_Click() MsgBox "Please Call In" ActiveWorkbook.Save ActiveWorkbook.Close End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Closing workbooks w/o closing Excel | Excel Discussion (Misc queries) | |||
Excel not completely closing down | Excel Discussion (Misc queries) | |||
my files won't load completely in excel | Excel Discussion (Misc queries) | |||
Closing Excel Completely | Excel Programming | |||
Closing Excel Completely | Excel Programming |