XL: Application.Interactive Value Not Reset When Macro StopsLast reviewed: February 3, 1998Article ID: Q151332 |
The information in this article applies to:
SYMPTOMSApplication.Interactive does not reset itself to a default value after the end of the macro is reached.
CAUSEThe Interactive property of the Application object allows a macro to block all user input from both the keyboard and the mouse. The property is useful in situations where user input has the potential to disrupt macro operations. However, unlike most of the Read/Write properties of the Microsoft Excel Application object, Application.Interactive does not reset itself to a default value after the end of the macro is reached. Because of this, if the interactive property is not reset back to a true value in the code of the macro, or an error occurs during execution of the macro, Microsoft Excel will not respond to user input even though the macro has technically stopped executing.
RESOLUTIONIn the case where the user forgets to reset the property back to true, or the user encounters an error in the execution of the code, it will most likely be necessary to shut down that instance of Microsoft Excel and fix the line of code that caused the error. Using CTRL+ALT+DELETE on Windows 95 and Windows NT and ending the Microsoft Excel task will accomplish this. On the Apple Macintosh, the user will need to use OPTION+COMMAND+ESCAPE to force Microsoft Excel to quit. Under Windows 3.x the user may be able to use CTRL+ALT+DELETE, but more often than not, because no "error" has occurred, the user will have to restart the machine.
Sample Visual Basic ProcedureMicrosoft 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.aspIn the event that it is necessary to enable user input to Microsoft Excel without a restart of the application, there is a method to reset the property using Automation through a Visual Basic for Applications macro. NOTE: The success of the following macro depends on the ability to open a separate instance of Microsoft Excel. Under Windows 3.x, the number and complexity of applications that can be running concurrently is directly dependent on available System Resources. If the instance of Microsoft Excel that is not responding, or the instance the user is trying to open contains many worksheets, charts and so on, System Resources will be significantly reduced. In Microsoft Excel 98, you cannot start a separate instance of Microsoft Excel, and therefore must run the macro from another application. The method for opening a separate instance of Microsoft Excel varies depending on the operating system.
Windows 3.x and Windows NT
Windows 95
Microsoft Excel 5.0 on the Apple Macintosh
Microsoft Excel 98 Macintosh EditionAs stated previously, you cannot start more than one instance of Microsoft Excel 98; therefore, you must run the Visual Basic for Applications Sub procedure from another Microsoft Office program. In this example, we will use Microsoft Word 98.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. REFERENCES "Microsoft Excel 5 Visual Basic for Applications Reference", version 5.0, page 342 "Microsoft Excel/Visual Basic Reference", second edition, page 394
|
Additional query words: 5.00 5.00a 5.00c 7.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |