-
Prevent VBA generated charts from refreshing
Hi, I have generated a bunch of charts using VBA.
Everything worked fine. However I created those charts based on data that was only temporarily available (while looping thru the macro).
When I hit F9 now all my pretty charts go blank because the data is gone. Anyway to prevent that?
So I am pretty much looking for a vba property that I dont know.
THANKS a lot!!!!
-
Take a screenshot and paste that in? :P
I don't know of a way to do that when the data is gone...it doesn't seem to me that it would work just looking at how charts work, but I haven't done anything in VBA with charts before.
-
When you have finished creating the chart, try
[vba]Sheet1.ChartObjects("MyChart").CopyPicture[/vba]
then paste it onto the sheet and delete the chart object.
-
Hi,
When you create the charts, try running something like this on each one after you have them set up:
[VBA]Sub ChartVals(cht As Chart)
Dim s As Series
For Each s In cht.SeriesCollection
s.Values = s.Values
s.XValues = s.XValues
Next s
End Sub
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules