Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default disable closing of workbook

Hi

I want a code that could save the workbook if the user closes it!
--
Varun Nair

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default disable closing of workbook

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

this would go in the Thisworkbook module of the workbook.

Chip Pearson's page on events if you are not familiar:
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy



"Varun Nair" wrote:

Hi

I want a code that could save the workbook if the user closes it!
--
Varun Nair

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
Closing a workbook N1KO Excel Discussion (Misc queries) 0 February 12th 09 03:51 PM
closing a workbook oercim Excel Programming 0 March 24th 06 01:27 PM
Closing Hidden Workbook when Active Workbook is Closed SusanK521 Excel Programming 5 September 24th 05 12:27 AM
how to disable save prompt on closing excel file in automated mode [email protected] Excel Discussion (Misc queries) 3 July 6th 05 10:35 PM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM


All times are GMT +1. The time now is 10:35 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"