XL: Macro to Determine If Excel Is Open for In-Place EditingLast reviewed: December 1, 1997Article ID: Q110754 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, there is no Visual Basic function to determine whether Microsoft Excel is open for in-place editing. To return this information in a Visual Basic procedure, you must run a Microsoft Excel 4.0 macro that uses the GET.WORKSPACE() macro function.
MORE INFORMATIONMicrosoft 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 engineers 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/default.aspWhen you embed a Microsoft Excel worksheet or chart in a program that supports in-place activation, when you double-click the embedded object, you remain in the client application but the menus and toolbars change to those of Microsoft Excel. It may be useful in a Visual Basic procedure to determine whether Microsoft Excel is open for in-place editing. For example, you may create an add-in that needs to perform different actions if Microsoft Excel is open for in-place editing. The GET.WORKSPACE() macro function returns information about the workspace. You can use this function with the following syntax to determine whether Microsoft Excel is open for in-place editing:
=GET.WORKSPACE(71)To return this information in a Visual Basic procedure, you can use the RUN method to run a Microsoft Excel version 4.0 macro containing the GET.WORKSPACE(71) function. The following procedure, demonstrates how to use this method.
REFERENCESFor more information about Editing a Microsoft Excel Object Embedded In Another Application, choose the Search button in Help and type:
in-place activationFor more information about the Run Method, choose the Search button in the Visual Basic Reference and type:
Run Method |
Additional query words: 5.00 ole link embed linking embedding
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |