1

I have a spreadsheet that uses a DDE (dynamic data exchange) service link. The cell contains a formula where marketQuote is the DDE service:

=marketQuote|last!googl

The value of this cell is constantly changing. So, I would like capture every time the quote/value in the cell changes, and then store this value in an array (using vba/macro?) before the cell changes, and the previous value is overwritten and lost forever.

It is possible to do this in excel?

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Savrige
  • 3,352
  • 3
  • 32
  • 38
  • 1
    You should read up on the `Worksheet_Change` event, and write some code that captures the changes to your DDE-linked cell. – PeterT May 14 '20 at 21:05
  • 1
    Say if the DDE is refreshed every 5 seconds, Do you really want VBA to run every 5 seconds and update the value to an array? This will keep excel busy. Is there no other way to accumulate data from DDE without excel. [Here is a similar question.](https://stackoverflow.com/questions/44458644/excel-vba-create-rows-for-each-updated-value-in-dde-link-cell) .. Also, you may want to refer [this question](https://stackoverflow.com/questions/57014784/running-an-excel-macro-when-info-is-pushed-through-a-dde-connection) – Naresh May 15 '20 at 08:43
  • 1
    .. and [this](https://stackoverflow.com/questions/57672519/excel-live-data-counter-dde-server) and [this](https://stackoverflow.com/questions/2409060/trying-to-launch-a-macro-when-the-value-of-a-dde-range-changes) – Naresh May 15 '20 at 08:43
  • I thought about that, the cost of processing "high frequency changes" could lead a poor performance. Maybe , a solution will be set a timer to read the cell value every 10secs, but in this some data could not be register – Savrige May 15 '20 at 11:05

0 Answers0