Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with quiting a workbook
Hi All, i have a problem in trying to close my workbook with code. My
workbook is called "Recon_Master.xls. I use the following code: Workbooks("Recon_Master.XLS").Close SaveChanges:=False It works, but leaves like an excel "shell" and i need it all to close ? I have used application.quit as well but if the user has another workbook open it closes that as well and i had a very irate user on my hands !! Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with quiting a workbook
application.workbooks.count Will tell you how many workbooks are open, if this is 0 then you can call the quit code. Hope this helps, Rob "Tempy" wrote: Hi All, i have a problem in trying to close my workbook with code. My workbook is called "Recon_Master.xls. I use the following code: Workbooks("Recon_Master.XLS").Close SaveChanges:=False It works, but leaves like an excel "shell" and i need it all to close ? I have used application.quit as well but if the user has another workbook open it closes that as well and i had a very irate user on my hands !! Tempy *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? | Excel Programming | |||
Excel crashes after quiting | Excel Programming | |||
Quiting Gracefully! | Excel Programming | |||
Quiting Excel | Excel Programming | |||
What commands do you use to name a workbook, save a workbook,open a workbook | Excel Programming |