Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Worksheet close event++?

Thanks for the reply,
I have an out of proc application (automating Excel with C++ client)
that holds references to many ranges. If user deletes one of the worksheets
that I have a reference, then I need to clear my pointers. I am able to do
this if the user deletes the workbook, because I get an event on the close,
but not if he deletes a single worksheet.
Many thanks

Has


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Worksheet close event++?

Normally the sheet is active when user manually deletes it. After it's
deleted a Sheet Activate event will fire, both at Workbook and Application
levels.

Either directly in, or called from this event you can check your sheet still
exists, eg

Dim ws as worksheet
On error Resume Next
Set ws = MyGlobalRange.Parent
If Err.number then
Set MyGlobalRange = Nothing
'etc
End if

Regards,
Peter T

"has ex" wrote in message
...
Thanks for the reply,
I have an out of proc application (automating Excel with C++ client)
that holds references to many ranges. If user deletes one of the

worksheets
that I have a reference, then I need to clear my pointers. I am able to do
this if the user deletes the workbook, because I get an event on the

close,
but not if he deletes a single worksheet.
Many thanks

Has




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
Worksheet close event? has ex Excel Programming 4 April 12th 05 11:43 PM
EXCEL close event? bmm Excel Programming 1 November 9th 04 01:51 PM
Don't save before close event? Don Wiss Excel Programming 1 September 18th 04 01:51 AM
Event Procedures: Event on Worksheet to fire Event on another Worksheet Kathryn Excel Programming 2 April 7th 04 07:35 PM
After Close Event? Don Wiss Excel Programming 2 November 19th 03 12:30 AM


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