Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Personal.xls & Workbook_BeforeClose

Hi

Can anyone explain why the "Workbook_BeforeClose" event does not work with
the "Personal.xls" file.

The code below is in the "ThisWorkBook" module of the Personal.xls file.

'This works fine
Private Sub Workbook_Open()
MsgBox "Opening"
End Sub

'This does not work
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Closing"
End Sub
'(This does work however if Personal.xls is not closed at the same time as
the Excel application.)



Thanks
--

XL2003
Regards

William






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Personal.xls & Workbook_BeforeClose

It works fine for me.

Are you sure you saved personal.xls after making the change and before you
tried to close it?

--
Regards,
Tom Ogilvy


"William" wrote in message
...
Hi

Can anyone explain why the "Workbook_BeforeClose" event does not work with
the "Personal.xls" file.

The code below is in the "ThisWorkBook" module of the Personal.xls file.

'This works fine
Private Sub Workbook_Open()
MsgBox "Opening"
End Sub

'This does not work
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Closing"
End Sub
'(This does work however if Personal.xls is not closed at the same time as
the Excel application.)



Thanks
--

XL2003
Regards

William








  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Personal.xls & Workbook_BeforeClose

Thanks for replying Tom.

"...Are you sure you saved personal.xls after making the change and before
you tried to close it?..."
Yes, retested on 2 computers, one with XL2002 and one with XL2003. I also
created a new "Personal.xls" file without any code other than the WorkBook
open and close messages. I also uninstalled all addins.

I think the problem lies with the Acrobat writer.....
--

XL2003
Regards

William



"Tom Ogilvy" wrote in message
...
It works fine for me.

Are you sure you saved personal.xls after making the change and before
you
tried to close it?

--
Regards,
Tom Ogilvy


"William" wrote in message
...
Hi

Can anyone explain why the "Workbook_BeforeClose" event does not work
with
the "Personal.xls" file.

The code below is in the "ThisWorkBook" module of the Personal.xls file.

'This works fine
Private Sub Workbook_Open()
MsgBox "Opening"
End Sub

'This does not work
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Closing"
End Sub
'(This does work however if Personal.xls is not closed at the same time
as
the Excel application.)



Thanks
--

XL2003
Regards

William










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 Ed Davis[_2_] Excel Discussion (Misc queries) 21 September 26th 09 01:01 AM
Workbook_BeforeClose problem Ajtb Excel Programming 0 February 11th 05 12:22 PM
Workbook_BeforeClose PO Excel Programming 2 January 30th 05 05:07 PM
Workbook_BeforeClose Don Guillett[_4_] Excel Programming 1 August 31st 04 02:27 PM
Workbook_BeforeClose JimP Excel Programming 1 July 5th 04 10:39 PM


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