+ Reply to Thread
Results 1 to 3 of 3

How to Evaluate Dynamic DDE Formulas

  1. #1
    Registered User
    Join Date
    07-13-2006
    Posts
    2

    How to Evaluate Dynamic DDE Formulas

    Hi All,

    I am new in Excel, but I have some experience in general programming. I
    have a problem with DDE dynamic formulas.

    I have an application that maintains templates of Excel Formulas in SQL
    Server. What I need is to load these formulas in Excel and evaluate them.

    These formulas are, in fact, DDE Links to a resource server. The resource
    values are updated as they change, and I need that the loaded formulas
    respond to the DDE advise event. That is they should change continuosly as
    the resource changes.

    And more some formulas must be contructed based on a specific cell. For
    instance Column 1 has the name of the resource, so the DDE Link formula in
    column 2 must be of type =appserver|topic!&CONTENTS OF ("C1").

    Well if I manually put the formulas in a cell like "=app|topic!item" they work.
    The Server is working OK !!!!

    To load the formulas from SQL Server is simple I have already done it. The
    problem:

    - How to contruct the formula dynamically
    - How to evaluate it so that it is refreshed as their value changes in
    the server

    Thanks in advance

  2. #2
    Harlan Grove
    Guest

    Re: How to Evaluate Dynamic DDE Formulas

    MArcus Baffa wrote...
    ....
    >These formulas are, in fact, DDE Links to a resource server. The
    >resource values are updated as they change, and I need that the loaded formulas
    >respond to the DDE advise event. That is they should change continuosly as
    >the resource changes.
    >
    >And more some formulas must be contructed based on a specific cell. For
    >instance Column 1 has the name of the resource, so the DDE Link formula in
    >column 2 must be of type =appserver|topic!&CONTENTS OF ("C1").
    >
    >Well if I manually put the formulas in a cell like "=app|topic!item"
    >they work. The Server is working OK !!!!

    ....

    You've come across one of the archaic deficiencies of Excel. DDE links
    in cell formulas can only be static, that is, =app|topic!item. You'd
    need to use VBA to make them function dynamically, and that involves
    using user-defined formulas (udfs) in VBA to create another Excel
    application instance, construct static DDE link formulas and evaluate
    them in the other instance, then return their values to the calling
    instance. It's slow and relatively fragile.

    Can you use VBA to do this?


  3. #3
    Registered User
    Join Date
    07-13-2006
    Posts
    2

    UDF and VBA

    Thanks Harlan,

    Well I have a good experience in VB, maybe I could implement it in VBA.

    But as I have told I do not have much experieence in Excel and its Object Model. I did not know that we could develop UDF.

    Where can I read about this ????

    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1