Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Workbook BeforeClose Bug

Does anyone have an explanation for the following:

1) Put this code in the ThisWorkbook module of a new blank Excel Workbook.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Worksheets("Sheet2").Activate
End Sub


2) Save the workbook as Test1.xls
3) Close Excel.
4) Make a copy of Test1.xls and name it Test2.xls.
5) Open both Test1.xls and Test2.xls.
6) Click the Close ("X") button for Excel (the upper right hand corner of
the Excel window).


You will notice that neither workbook closes. What is that all about.


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
beforeclose placement Curt Excel Discussion (Misc queries) 9 August 27th 07 08:00 PM
PASSWORD PROTECT BEFORECLOSE KandK Excel Discussion (Misc queries) 4 June 8th 06 09:34 AM
BeforeClose Dilemma J. Cornor Excel Programming 0 June 21st 04 07:39 PM
Workbook_Beforeclose vs BeforeClose Event Juan Pablo González Excel Programming 3 February 2nd 04 12:17 AM
BeforeClose event - Savings Mike[_40_] Excel Programming 3 September 24th 03 11:33 AM


All times are GMT +1. The time now is 08:29 AM.

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"