The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
RESOLUTION
To 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:
WARNING: Code that refers to Screen.ActiveControl or Screen.ActiveForm will not work correctly when called from the Debug window because the Debug 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 will occur. Use the Me object instead of the ActiveControl property in Event procedures. MORE INFORMATIONSteps to Reproduce Behavior
REFERENCESFor more information about using the ActiveControl object, search the Help Index for "ActiveControl property," or ask the Office Assistant. Additional query words: screen
Keywords : PgmObj |
Last Reviewed: April 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |