XL: Client Not Updated with Multiple Instances of Excel

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 programming examples 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. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.asp
  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 query words: 8.00 97

Keywords : kbprg kbdta KbVBA
Version : WINDOWS:1.0,2.0,5.0,7.0,97
Platform : WINDOWS
Issue type :


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