View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
millwalll millwalll is offline
external usenet poster
 
Posts: 31
Default Macro and chart help

is there anyway i can have the chat display for like 10 min then delete itself

"JLGWhiz" wrote:

The way your code is written, the chart is constantly tied to the source
range and any change in the source range will change the chart. Some people
want this feature so their charts are always up to the minute.

To separate the chart from the source range, you can copy the data from the
source range to a different sheet that is not used by the general public and
use that to create the chart.

This would be the data you want to copy to the separate sheet:

Range("C11,J11,C20,J20,C24,J24,C28,J28,C31,J31,C36 ,J36")

By copying the data and then creating the chart, your chart will remain
unchanged until you run your macro to create it again. Of course it would
be wiser to write a new macro that simply updates the original rather than
continue to create each time, since the create method would generate error
flags due to the existing chart.
But the point is, unless you separate the chart from its source data and
others are using the source file, then you will continue to have the
potential for unwanted changes to your chart.


"millwalll" wrote:

Hi all ,
Need some help I have recorded a macro that produces a chart. When the user
try's another search the chart goes wrong. So I need to delte the chart if
the user does another search. That way there wont be a chart on screen that
is wrong any can i do this by using if statement or is there another way to
do this?

Thanks