XL: DDE EXIT() Returns #VALUE! Error Value

Last reviewed: March 27, 1997
Article ID: Q108723
1.00 WINDOWS kbother kbprb kbtool

The information in this article applies to:

  • Microsoft Query for Windows, version 1.0
  • Microsoft Query for WIndows 95, version 2.0
  • Microsoft Excel for Windows, version 5.0
  • Microsoft Excel for Windows 95, version 7.0

SYMPTOMS

When a macro initiates a DDE channel to Microsoft Query and sends the EXIT() command from within the EXECUTE() function, the command will be evaluated to a #VALUE! error value.

When you have a query open in Microsoft Query, the application will not end and will evaluate to a #REF! error value. Using the EXIT(TRUE) function will always end Microsoft Query and evaluate to the #VALUE! error value. EXIT() or EXIT(FALSE) will close Microsoft Query only if there are no open queries that were opened on another channel.

MORE INFORMATION

The errors are returned when you execute a command through a DDE channel because Microsoft Query can only successfully return to Microsoft Excel after it has executed the entire command successfully. Once the application has terminated, it cannot return a response back to Microsoft Excel (at which time a #VALUE! error value must be returned).

Steps to Reproduce the Problem

  1. Run Microsoft Query

  2. Switch to Program Manager and run Microsoft Excel 5.0

  3. From the Insert menu, choose Macro, and then choose MS Excel 4.0 Macro sheet.

  4. Enter the following macro:

          A1: chan=INITIATE("MSQuery","system")
          A2: =EXECUTE(chan,"[EXIT()]")
          A3: =HALT()
    

  5. Run and step through the macro.

A2 above evaluates to a #VALUE! error value. Note that Microsoft Query has been closed.


KBCategory: kbother kbprb kbtool
KBSubcategory: xlquery

Additional reference words: 1.00 5.00 7.00
Keywords : xlquery kbother kbprb kbtool
Version : 1.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.