OL97: Click Event Behavior for Standard ControlsID: Q231593
|
This article describes how the standard controls that are included with Microsoft Office and Outlook, respond to the Click event using Visual Basic Scripting Edition (VBScript) on a custom Outlook form.
The Click event is the only event that Outlook supports for controls. However, for some controls, the Click event may not fire if the control is bound to a field, or it may not fire at all.
For additional information about the differences between fields and controls, and how they are typically bound together, please see the following article in the Microsoft Knowledge Base:
Q168975 OL97: How to Use Fields and Controls with VBScriptIf a control is bound to a field, the Click event does not fire. However, either the PropertyChange or the CustomPropertyChange event typically fires because data is changing in the underlying field.
PropertyChange or
CustomPropertyChange
Control Unbound Bound event fires when bound?
---------------------------------------------------------
Label Yes No N/A
TextBox No No Yes
ComboBox Yes(1) No Yes
ListBox Yes(1) No Yes
CheckBox Yes No Yes
OptionButton Yes No Yes
ToggleButton Yes No Yes
Frame Yes N/A N/A
CommandButton Yes N/A(2) N/A
MultiPage No(3) N/A N/A
TabStrip No N/A No
ScrollBar No No No
SpinButton No No No(4)
ImageControl Yes No No
N/A = Not applicable
(1) These controls must have possible values set in the control
in order for the Click event to fire.
(2) Commandbuttons are bound to Outlook dialogs, such as the address
book dialog, Full Name dialog (contact form), and such, so the
Click event is not applicable to VBScript.
(3) The Multipage1_Click event doesn't fire, but the Page1_Click
event fires when the user clicks in the body of an individual
page. However, this event does not typically provide useful
functionality for a solution.
(4) To use a Spinbutton, you bind the Spinbutton and a Label or Textbox
control to the same field. The Label or Textbox will then show the
current value of the SpinButton.
For more information about creating solutions with Microsoft Outlook 97,
please see the following articles in the Microsoft Knowledge Base:
Q166368 OL97: How to Get Help Programming with Outlook
Q170783 OL97: Q&A: Questions About Customizing or Programming Outlook
Additional query words: OutSol OutSol97
Keywords : kbdta
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: May 18, 1999