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

ID: Q108723


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.

Additional query words:

Keywords : xlquery
Version : 1.00
Platform : WINDOWS
Issue type :


Last Reviewed: September 21, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.