Executing the FORM? Function from Another Application

Last reviewed: November 2, 1994
Article ID: Q74520

SUMMARY

As stated in the "Q+E for Microsoft Excel User's Guide" on page 98, the FORM? function cannot be executed from another application by using DDE (dynamic data exchange).

MORE INFORMATION

Steps to Reproduce

  1. Create and run the following macro.

          A1: chan=INITIATE("QE","SYSTEM")
          A2: =APP.ACTIVATE("Q+E")
          A3: =EXECUTE(chan,"[open('query1.qef')]")
          A4: =TERMINATE(chan)
          A5: =RETURN()
    

    where 'query1.qef' contains:

          Q+E 3.0 for dBASEFile SELECT ALL FROM C:\EXCEL\QE\EMP.DBF
          Compatibility=DBASE,CharSet=IBMPC); form?()
    

The correct records are displayed but the FORM? command is ignored.

If you open this query file in Q+E, all records from EMP.DBF are displayed and then the FORM? dialog box is brought up.

Workaround

FORM?() can be executed from a macro using the Send.keys command as shown below.

   A1: chan=INITIATE("QE","SYSTEM")
   A2:=ERROR(FALSE)
   A3: =SEND.KEYS("%fo",FALSE)
   A4: =SEND.KEYS("%c:\excel\qe\query1.qef~")
   A6: =RETURN()

Note: This example assumes that Q+E is either running or in your path. You may need to modify line 4 to refer to the correct locations of the query file you want to open.

REFERENCES

"Q+E for Microsoft Excel User's Guide." Version 3.0, page 98.

"Microsoft Excel Function Reference," Version 3.0, page 214.


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


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: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.