Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Is there a Sheet delete property?

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 7/28/2003
ActiveSheet.Select
ActiveWindow.SelectedSheets.Delete
End Sub
-----Original Message-----
Hi,

When you have deleted a sheet and catch it in the

deactivate event, is
there a property in the object model that indicates that

you have
selected delete sheet? The reason why I need to know is

because the
deactivate event is fired even when you switch between

sheets and I
only want to perform certain actions when delete has

been selected?

Thanks,

Rick
.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Is there a Sheet delete property?

Does anyone have any ideas on my original question? See my first post
in this message??
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Is there a Sheet delete property?

Hi Rick:

There is no trappable Worksheet_Delete event. A workaround might be to use
the Deactivate event and then check if the worksheet still exists.

Regards,

Vasant.


"Rick De Marco" wrote in message
om...
Does anyone have any ideas on my original question? See my first post
in this message??



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Is there a Sheet delete property?

Thanks Vasant,

Do you know if there is a way to cancel a sheet being deleted once a
user has selected delete on the excel delete message box? Basically i am
trying to stop users from deleteing a sheet if it has certain data in
it. I don't want to protect the worksheet/workbook.. I will be doing my
checking in the deactivate event and if certain criteria are meet then i
need to cancel the delete..

Any ideas?

Rick


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Is there a Sheet delete property?

Sorry, Rick; AFAIK there is no way to prevent deletion of a sheet (without
protecting the workbook).

Regards,

Vasant.

"Rick De Marco" wrote in message
...
Thanks Vasant,

Do you know if there is a way to cancel a sheet being deleted once a
user has selected delete on the excel delete message box? Basically i am
trying to stop users from deleteing a sheet if it has certain data in
it. I don't want to protect the worksheet/workbook.. I will be doing my
checking in the deactivate event and if certain criteria are meet then i
need to cancel the delete..

Any ideas?

Rick


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





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
Excel 2007 crashes after viewing property sheet in Data Connection Fritz New Users to Excel 14 April 3rd 12 09:23 AM
Delete values in sheet 2 that arre found in sheet 1 np Excel Discussion (Misc queries) 1 December 10th 09 07:21 PM
2007: Property Sheet button disabled Richard H Excel Discussion (Misc queries) 5 February 26th 08 02:21 AM
Best way to inser file property into and excel sheet (cell) Luc Excel Discussion (Misc queries) 3 July 5th 05 08:36 PM
Print>Properties>Layout>Pages per sheet: this function/property . Turck Excel Discussion (Misc queries) 2 May 28th 05 10:45 PM


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