Chart Refresh/Update Issues

  • Thread starter Thread starter odie
  • Start date Start date
O

odie

MS Excel 2000 SR-1
I am using an advanced filter on my chart's source data but the chart
refuses to update automatically when I change the filter criteria.
Calculation is set to automatic and the 'Plot Visible Cells" option is
checked. I have tried activechart.refresh and the 'doevents' trick as well
without success. Currently I have found a 'workaround' by setting the 'Plot
Visible Cells' option on and off using the following code:
Application.ScreenUpdating = False
ActiveChart.PlotVisibleOnly = False
ActiveChart.PlotVisibleOnly = True
Application.ScreenUpdating = False

Is there a better way to accomplish this?
 
Odie,

Changing the filter criteria alone won't change the cells shown (thus the
same charted stuff); it isn't dynamic. You have to run the advanced filter
again. Could that be what's going on? But I don't know why your code would
update the chart (it doesn't update the cells), so mayhaps I've missed the
point. You can update the advanced filter with code. If I run the advanced
filter again with different criteria, the chart updates per the new visible
cells. XL2002. I think the Refresh method is for Pivot Charts.

Earl Kiosterud
mvpearl omitthisword at verizon period net
 
Sorry I could of explained that better. Yes I am using code to redo the
filter:

Sub ScrollBar2_Change()

Worksheets(srt_sht).Range("B:B").AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:=Worksheets(srt_sht).Range _
("AR1:AR2"), Unique:=False

Application.ScreenUpdating = False
ActiveChart.PlotVisibleOnly = False
ActiveChart.PlotVisibleOnly = True
Application.ScreenUpdating = False
End Sub

I think it is an Excel2000 thing...I shouldn't have to run the last 4 lines
above but if I just run the filter the data does update but the chart does
NOT.

Thanks again
 
Odie,

It appears you're using a web site of some kind,
which makes a mess of the threading in newsgroups. It's better to connect
directly to msnews.microsoft.com. If you have Outlook
express, it's Tools, Accounts, News, Add.
 
I am using OE 6.0 and connecting using a company (government) newserver. I
am not sure what 'mess' you are refering to as everything looks and works
properly from my end. I have also checked posts from home (read only) on
google groups and nothing seemed to be messed up. I am going to take your
suggestion anyway to connect to the MS news server just to be safe.

PS: I have done a lot more reading on the chart refresh/update issues in
excel and the general conclusion seems to be to use embedded chart objects
on the worksheet vice chart sheets. This will also free me from HAVING to
use form's controls only with my charts. For me anyway this seems to be the
path of least resistance...
 
Odie,

I've tried charting from data filtered with Advanced Filter using either a
chart in a worksheet or a chart sheet. Seems to work either way. When I
change the filter, the data in the chart changes. Dunno. Using Excel 2002
with Win XP. Try looking at the source data. Chart, Source Data. See if
it's what it should be (should be the entire unfiltered range).

As for the threading, your first reply doesn't appear as a reply to mine,
but directly under it, as if it's another reply to your OP. Your next reply
does in fact appear as a reply -- it's indented. I'm using OE 6.
 
Back
Top