Microsoft KB Archive/231593

From BetaArchive Wiki
Knowledge Base


Article ID: 231593

Article Last Modified on 1/24/2007



APPLIES TO

  • Microsoft Outlook 97 Standard Edition



This article was previously published under Q231593


SUMMARY

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.

MORE INFORMATION

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:

168975 OL97: How to Use Fields and Controls with VBScript


If 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.

The following table summarizes whether or not the Click event will fire under various circumstances:

                                     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.
                

REFERENCES

For more information about creating solutions with Microsoft Outlook 97, please see the following articles in the Microsoft Knowledge Base:

166368 OL97: How to Get Help Programming with Outlook


170783 OL97: Q&A: Questions About Customizing or Programming Outlook



Additional query words: OutSol OutSol97

Keywords: kbinfo kbprogramming KB231593