XL: Client Not Updated with Multiple Instances of Excel

ID: Q107745

The information in this article applies to:

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:

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/refguide/

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: 5.00 7.00 8.00 97

Keywords          : kbprg kbdta KbVBA 
Version           : WINDOWS:5.0,7.0,97
Platform          : WINDOWS

Last Reviewed: May 17, 1999