Well, I am pretty sure all mistakes happen when I open up the excel workbook, and I answer the opening popup question by pressing "Update" (DDE links). These links are the IB links in cells in the form of "=userid|tik!id2?last" for example. These are links to numbers, such as last price, bid, ask, high, low, volume.
Then, in my vba code, I define those values I got from the DDE links as "dim last_price as double", "dim bid as double" and let's say "last_price = cells(1,1)", "bid = cells(1,2)".
Now, whether I define these values as "double" or "integer" the errors I get are just in the same amount.
I wonder what exactly you are saying about getting DDE links as "strings". It sounds like it could be the problem, yet aren't the DDE values just what they look like? In other words, if I get a price from the DDE link, isn't that automatically an integer or a double? Are you saying that "=userid|tik!id2?last" for example could be perceived as a string by vba, even though it produces a number in my sheet cell?
Then, in my vba code, I define those values I got from the DDE links as "dim last_price as double", "dim bid as double" and let's say "last_price = cells(1,1)", "bid = cells(1,2)".
Now, whether I define these values as "double" or "integer" the errors I get are just in the same amount.
I wonder what exactly you are saying about getting DDE links as "strings". It sounds like it could be the problem, yet aren't the DDE values just what they look like? In other words, if I get a price from the DDE link, isn't that automatically an integer or a double? Are you saying that "=userid|tik!id2?last" for example could be perceived as a string by vba, even though it produces a number in my sheet cell?
- I would overwrite the dde links with values , and then point them to the required dde links when the workbook is fully open ... as initailly the dde links will return n/a#.... I have this with quite a few of my applications that trigger on 'Calculation' events.