The information in this article applies to:
SYMPTOMSWhen you display a UserForm in Microsoft Excel, you can still interact with the workbook even though you have turned off interactivity by setting the ShowModal property to True. CAUSEThis problem occurs when you have a Microsoft Visual Basic for Applications macro which contains code similar to the following behind the user form:
When you set Application.Interactive to False and then True, it overcomes the ShowModal property setting of True.
WORKAROUNDTo work around this problem, do not use the Application.Interactive property to control interactivity with the user form. Instead, use only the ShowModal property. To use the ShowModal property, follow these steps:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. 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 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 a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/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.aspIn earlier versions of Microsoft Excel, user forms were always modal, meaning interactivity with the workbook was never allowed when the user form was displayed. In Excel 2000, you can specify interactivity with the workbook through the ShowModal property and through code. When creating a user form, ShowModal is set to True by default, which does not allow interactivity. When the ShowModal property and the interactivity code conflict, the ShowModal property usually takes precedence. You can override this precedence in a Visual Basic for Applications macro by first setting the interactivity equal to the ShowModal setting and then setting interactivity to the setting you want. The following macro code disables interactivity
and the following macro code enables interactivity:
When the ShowModal property is True, interactivity is disabled. When the ShowModal property is False, interactivity is enabled.
REFERENCESFor additional information about user forms and interactivity, please see the following article in the Microsoft Knowledge Base: Q234258 Displayed UserForm Does Not Allow Interactivity with Workbook Additional query words: XL2000
Keywords : |
Last Reviewed: July 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |