XL: Client Not Updated with Multiple Instances of Excel

Last reviewed: September 2, 1997
Article ID: Q107745
The information in this article applies to:
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel for Windows, version 5.0
  • Microsoft Query 97 for Windows
  • Microsoft Query for Windows 95, version 2.0
  • Microsoft Query for Windows, version 1.0

SUMMARY

When multiple instances of Microsoft Excel are simultaneously serving as dynamic data exchange (DDE) clients to a single DDE server, only one instance of Microsoft Excel will be updated.

MORE INFORMATION

This is a problem with the current implementation of the DDE management library (DDEML). The problem will only occur when all of the following conditions are met:

  • There are two or more instances of the same application serving as DDE clients.
  • The applications all have objects with the same name (such as "Sheet1")
  • The applications are all trying to use FETCH.ADVISE

Steps to Reproduce Problem

Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.

  1. Start Microsoft Query.

  2. Open two instances of Microsoft Excel and run the following Visual Basic macro from each instance:

       Sub dde()
    
          chanNum = DDEInitiate("msquery", "system")
          ' Use the path for your query file for the following:
          ' Note: query files in Excel 97 contains a dqy extension.
          DDEExecute chanNum, "[open('c:\excel\query1.qry')]"
          nRows = DDERequest(chanNum, "NumRows")
          nCols = DDERequest(chanNum, "NumCols")
          DDEExecute chanNum, "[fetch.advise('Excel','sheet1','r1c1:r" & _
          nRows(LBound(nRows)) & "c" & nCols(LBound(nCols)) & "','all')]"
    
       End Sub
    
       NOTE: You will need to create a query file to run this macro if you
       don't already have one. Use the path for this file in line 2 of the
       macro.)
    
    

  3. Check Sheet1 on both instances of Excel; they should display a copy of the query.

  4. Switch to Query Tool and from the Records menu, choose Allow Editing.

  5. Change some of the records in the query.

Check Sheet1 on both instances of Microsoft Excel; the records should have been updated on one but not the other.


Additional reference words: 5.00 7.00 8.00 97
Keywords : IntpDde kbprg
Version : 5.00 7.00 97
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: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.