Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forcing worksheets to be closed first when user trying to close excel


Hi, stick this in the this workbook module, no matter how you try t
close the workbook it will save it first (as long as you hav
previously saved it i.e not the generic Book1.xls that is generate
when you first open a new workbook) and then allow it to close.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Save
End Sub

HTH

Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=27571

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
VBA project does not close when workbook is closed Simon Norris Excel Programming 5 March 2nd 16 05:34 PM
Forcing User inputs apache007 Excel Discussion (Misc queries) 1 February 6th 10 05:11 PM
why do all excel worksheets/workbooks close when I close one? Penny Excel Discussion (Misc queries) 1 November 29th 06 03:49 AM
Forcing Input from a user Tracy Excel Worksheet Functions 0 January 18th 06 07:39 PM
why do all files get closed when i only close one in excel? carrie Excel Discussion (Misc queries) 1 November 28th 05 06:45 PM


All times are GMT +1. The time now is 03:52 PM.

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

About Us

"It's about Microsoft Excel"