The information in this article applies to:
SYMPTOMSWhen you use dynamic data exchange (DDE) to control Microsoft Excel from another program, you will see the following error message when you try to rename a sheet in a workbook: When you activate Microsoft Excel after the error, the sheet tab is selected as if you are ready to change it. CAUSEThis error occurs when you are trying to rename a sheet by using the DDEExecute method with Workbook.Name() as the command in a Microsoft Visual Basic for Applications procedure or macro from another program. RESOLUTIONMicrosoft 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.aspIf the application supports Automation, it is recommended that you use Automation to control Microsoft Excel instead of DDE. For more information about controlling programs through Automation, click the Office Assistant, type Automation, click Search, and then click to view "Controlling one Microsoft Office application from another." NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Excel or Visual Basic Help are not installed on your computer, please see the following article in the Microsoft Knowledge Base: Q120802 Office: How to Add/Remove a Single Office Program or ComponentTo work around this behavior using DDE, write a Visual Basic procedure or macro in Microsoft Excel to rename the sheet and have the DDE procedure run the Microsoft Excel procedure or macro to change the sheet name. The following example uses Microsoft Word 97 as the program that contains the DDE macro that controls Microsoft Excel. It assumes that you are initiating a DDE channel to an existing workbook ("Book1.xls") and you are changing "Sheet1" to "New."
STATUSMicrosoft has confirmed this to be a problem in Microsoft Excel 97 for Windows. REFERENCES
"Visual Basic User's Guide," version 5.0, Chapter 10, "Controlling and
Communicating with Other Applications"
Q163435 VBA: Programming Resources for Visual Basic for Applications Additional query words: XL97 kbmacro
Keywords : kbinterop kbdta AutoGnrl KbVBA xlvbmigrate offinterop xlwin |
Last Reviewed: November 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |