Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 PM
Excel crashes after quiting Niranjan[_2_] Excel Programming 0 June 8th 05 10:06 AM
Quiting Gracefully! Kevin Excel Programming 5 September 9th 04 07:49 PM
Quiting Excel Michael Wise Excel Programming 4 March 4th 04 03:36 PM
What commands do you use to name a workbook, save a workbook,open a workbook Steven R. Berke Excel Programming 1 July 24th 03 11:37 PM


All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"