Q:Temporarily Freeze Charts Updates

P

pinkpanther

Is there a way using VB to freeze charts (graphs) from updating while
I run some code to adjust the axes? I have a workbook with 6 charts,
as sheets, and I would like to freeze these charts while I run some VB
code that updates their axes values. These are very heavily populated
charts and they redraw at every axes value change. This causes the
charts to flicker and I believe it is increasing execution time for
the code. I would like to have the charts update either at the end of
their section of code or at the end of the routine.

I have Tools => Options => Calculations set to manual.

Any help is appreciated,
Larry
 
P

pinkpanther

http://blogs.technet.com/heyscriptingguy/archive/2006/11/01/how-can-i...

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)

objExcel.ScreenUpdating = False

For i = 1 to 100
     For j = 1 to 100
       objExcel.Cells(i,j) = i * j
     Next
Next
objExcel.ScreenUpdating = True






- Show quoted text -

This is exactly what I needed!!!!!!!!!!!

Thx,
Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top