Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Workbook_BeforeClose: Cancel doesn't work

Hello

I posted on this topic a month ago but have had no reply. Can anyone
confirm this bug in Excel?

To reproduce the bug:

1. New workbook
2. In the Workbook_BeforeClose event procedure of the workbook module,
put this:

Cancel=True
MsgBox "Yes this event procedure is actually executing"

3. Close the workbook.
4. You get the MsgBox, but the workbook closes!

Versions:
BUG in XL2000 SP3 (9.0.6926 SP3)
NO bug in XL2000 basic (9.0.2720)

Kristian Mayville posted on this topic 21/07/2005 - he's found the
problem in XL2003
(11.6355.6360) SP1, VBA Retail 6.4.9972. No reply to him either.

What can I do? MVPs, Microsoft, are you listening? (There nothing in
the MS KB).


seb

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Workbook_BeforeClose: Cancel doesn't work

I just tried it in Excel 97, 2000, 2002 and 2003 and in all four I was
unable to close the workbook. Interestingly I have the exact same version
of 2000 as you.

--
Jim
"sebt" wrote in message
oups.com...
| Hello
|
| I posted on this topic a month ago but have had no reply. Can anyone
| confirm this bug in Excel?
|
| To reproduce the bug:
|
| 1. New workbook
| 2. In the Workbook_BeforeClose event procedure of the workbook module,
| put this:
|
| Cancel=True
| MsgBox "Yes this event procedure is actually executing"
|
| 3. Close the workbook.
| 4. You get the MsgBox, but the workbook closes!
|
| Versions:
| BUG in XL2000 SP3 (9.0.6926 SP3)
| NO bug in XL2000 basic (9.0.2720)
|
| Kristian Mayville posted on this topic 21/07/2005 - he's found the
| problem in XL2003
| (11.6355.6360) SP1, VBA Retail 6.4.9972. No reply to him either.
|
| What can I do? MVPs, Microsoft, are you listening? (There nothing in
| the MS KB).
|
|
| seb
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Workbook_BeforeClose: Cancel doesn't work

Thanks for your post Jim. I think from your extensive tests - and the
fact that nobody answered my previous post or Kristian's earlier post
on this topic - I have to conclude that no-one can reproduce this.

The factor which I realise I didn't mention is Citrix:

XL2000 basic (9.0.2720) is running on my local machine. In this
version there's no problem - the workbook won't close, as expected.
XL2000 SP3 (9.0.6926) is running on a Citrix server (Metaframe
Presentation Server 3.0). This is the version in which the problem
occurs - the workbook closes, even though Cancel has been set to True.

So it looks like Citrix is the obvious factor. Which seems odd: I
thought that Citrix was just a machine located elsewhere feeding
screen/mouse/keyboard input to the desktop. Maybe this assumption just
shows how little I know about Citrix - when I started out as an MS
developer 10 years ago I assumed that their products would do exactly
what they said they would, all the time...

It can't be something as simple as some equivalent of
Application.EnableEvents being set to False, because the event does
execute.

Think I'd better chase this up in a Citrix group.

thanks again


Seb

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
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work gpmichal Setting up and Configuration of Excel 1 May 12th 09 02:33 AM
Can't get Cancel to work in message box * Kenneth * Excel Discussion (Misc queries) 1 March 30th 06 08:10 PM
Workbook_BeforeClose - Cancel not working sebt Excel Programming 0 January 31st 06 04:36 PM
Workbook_BeforeClose doesn't work!!! [email protected] Excel Programming 3 October 17th 05 03:28 PM
Detecting a cancel on Workbook_BeforeClose event? Don Wiss Excel Programming 3 January 18th 05 12:49 PM


All times are GMT +1. The time now is 05:38 AM.

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"