Thanks:  0
Likes:  0

1. Hi
Ivan helped me out on this about a week ago by telling me that a DDE link may not fire off the change event.
Solution:

I will try and encapsulate this as best as I am able.

Am writing a trade tracking spreadsheet which tracks changes in two values:
Price and volume

Instead I created a standalone VB program which throws random prices and volumes into the spreadsheet via Ole.
Really, my main question is this:
Does Excel respond to Ole the same way it responds to a DDE link?

My problem is repeating values

Take these two seperate transactions:

Time Price Volume
01:13 5420.5 40
01:15 5420.5 40

The program will need to accumulate the volume for the same price.

The spreadsheet would save this as:

5420.5 80

The problem is this:
The calculation event is not fired if the same value replaces that which is in the cell. However, the change event does fire. Even when replaced with the same value.
If a DDE link will not fire off the change event, how do I capture the same volume?

Any help would be greatly appreciated!
I do hate failing!
Thanks!
Tom

2. Hi Tom

If I have followed you correctly (not sure I have) could you simply create a link to this cell on the same sheet and then use the Calculate Event. For example if the cell that is having the data dropped in is A1, in cell Z1 put =A1 this will cause the Calculate Event to fire.

3. Hi Dave!
You did follow me correctly, to a point.

The calculation event does indeed fire if the value fed via DDE is different from the value which is currently in the cell.

The calculation event does not seem to fire if there is no calculation. I'm overwhelmed with my brilliance> HA HA

Problem = this:

If a DDE link does not fire off a change event and the value of volume is the same as the previous transaction. I am stuck???

Time Price Volume
01:13 5420.5 40
01:15 5420.5 40

These are two different transactions.
These are actually two separate volumes.
They just happen to contain the same value.
If the same value = no calculation fired...
...and DDE does not fire the change event, how do I trap the second value?

Cerebral Circular Reference!!!!!

Thanks for any help!
Tom

4. Hi Tom

RE: If a DDE link does not fire off a change event and the value of volume is the same as the previous transaction. I am stuck???

Why can't you use the method I suggested, as this WILL fire the Calculation Event, If the value is the same or not.

5. Hi Dave
That is the method I am using =A1 ect...
I placed a break in the calculation event and no code was run when the value was replaced with the same value?
Thanks
Tom

6. Sorry Tom, I should have tested that first. The way around this could be to reference it via a Volatile function, eg:
=OFFSET(A1,1,1)

7. Thanks Dave.
I'll give it a try.
Volatile Function?
Will educate myself on this one.
Thanks!
Tom

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•