Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Auto Deleting of a Sheet?

Hi all.

I have a macro that creates a sheet of data then using that new sheet,
creates a chart. The data sheet is then hidden for easy of use for the end
users.

The problem I have is that when the user deletes the chart, the data sheet
remains. Is there a way to link the data sheet with the chart so that when
the chart is removed, the corrosponding data sheet is also removed?

Thanks - Ben H.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Auto Deleting of a Sheet?

There is no delete sheet event per se. However, you might be able to use the
workbook level sheetdeactivate event. the sh argument is a reference to the
chart (assumes the chart is a chart sheet and not an embedded object on a
worksheet) or sheet that has been deactivated. It fires if you delete a
chart - but unfortunately at the time the event fires, the chart still
exists. You could do an Application.Ontime Now type command that fires a
macro to check to see if it has been deleted and then delete the chart.
Calling the ontime immediately would still allow the chart "time" to be
deleted.
--
Regards,
Tom Ogilvy


"Ben H" wrote:

Hi all.

I have a macro that creates a sheet of data then using that new sheet,
creates a chart. The data sheet is then hidden for easy of use for the end
users.

The problem I have is that when the user deletes the chart, the data sheet
remains. Is there a way to link the data sheet with the chart so that when
the chart is removed, the corrosponding data sheet is also removed?

Thanks - Ben H.

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
Auto deleting data after one year Geo Excel Discussion (Misc queries) 15 October 15th 07 09:20 AM
Excel 2002 auto deleting cswasson Excel Discussion (Misc queries) 1 May 23rd 06 01:01 PM
auto deleting defined rows LoriM Excel Discussion (Misc queries) 4 August 4th 05 06:20 PM
Auto Update upon shifting, inserting or deleting Tracy B Excel Worksheet Functions 2 April 6th 05 08:37 PM
Macro for auto deleting row if cell value = x nancee Excel Programming 1 July 8th 04 01:22 AM


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