Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing data in a graph vary with 'real' time

Status
Not open for further replies.

corus

Mechanical
Nov 6, 2002
3,165
I have two columns of data which, via a command button and a macro to perform some calculations, the values change. When I plot these values I want the viewer to see the graph alter as the data changes. In the spreadsheet I see the data in the columns change but the graph just freezes, until the calculations have finished. So I see the initial graph and the final graph but no nice smooth change as the data varies. I've tried using a sleep function but that just seems to stop the macro from working, and the graph remains frozen until its finished. Any ideas on how to solve this?

 
Replies continue below

Recommended for you

Depends on what you macro is doing, but in general I'd think you need to force a sheet recalculation inside your macro.

 
Many thanks. I've inserted ActiveSheet.Calculate within the macro and now it works fine.


 
I would agree with that assessment. Note also, doing so will probably slow down your macro by an order of magnitude. I don't think Excel can incrementally draw on a graph; it would refresh the entire graph each time.

TTFN
faq731-376
7ofakss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor