Microsoft KB Archive/58448

From BetaArchive Wiki

Use of the ON.DATA() Command in Excel

Last reviewed: November 2, 1994
Article ID: Q58448


When using the ON.DATA() command in Excel, you need to verify the following:

  1. Ignore Remote Requests must be unchecked in Excel (choose Workspace from the Options menu).
  2. The argument for Document_Text in the ON.DATA() function must refer to a sheet name that contains remote references and ONLY the sheet name, not including cell references.
  3. The DDE link must be to another application. ON.DATA() will not run if the link is to a second instance of Excel. Page 320 of the Excel Functions and Macro Guide states:

            "ON.DATA() starts the macro specified whenever ANOTHER
             application sends new data to the document specified."


  1. You can ensure that the "Ignore Remote Requests" check box is unchecked by issuing the following macro statement before the ON.DATA() command:

  2. Valid ON.DATA() commands would look like the following:


You may NOT reference any particular cells. The following would NOT be valid:


The ON.DATA() command is used in Excel when you want a particular macro to run any time there is any type of update to a particular worksheet via DDE. The format of the formula is =ON.DATA("Document_Text","Macro_text"). If executed properly, the macro defined by Macro_text will run every time there is a DDE update to the worksheet specified by Document_Text.

KBCategory: kbother


Additional reference words: noupd

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.