The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills.
RESOLUTIONTo refer to the Name property of the Screen.ActiveControl or Screen.PreviousControl, you should create a variable and assign the name of the control to that variable. For example, the following sample piece of code is one way you could refer to the active control's name: NOTE: Code that refers to Screen.ActiveControl or Screen.ActiveForm does not work correctly when called from the Immediate window because the Immediate window has the focus at that time. If no control has the focus when you use the Screen.ActiveControl property, or if all of the active form's controls are hidden or disabled, a run-time error occurs.
MORE INFORMATIONSteps to Reproduce Behavior
REFERENCESFor more information about the ActiveControl property, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type "ActiveControl" in the Office Assistant or the Answer Wizard, and then click Search to view the topic. Additional query words: screen object
Keywords : kbdta AccCon |
Last Reviewed: July 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |