Page 478 - Microsoft Office Excel 2003 Programming Inside Out
P. 478

Microsoft Office Excel 2003 Programming Inside Out































             Chapter 21
                             Figure 21-2.  The Outlook Calendar with the newly created Spring Sales Initiative Meeting on
                             the morning of March 7, 2005.

                    Early Binding

                             In early binding, the binding between the object variable and the object occurs when the
                             application is compiled. The end result is better performance compared to late binding. You
                             can add an Object Library using the References command from the Tools menu in the Visual
                             Basic Editor. When the reference has been added to the VBA Project, you are able to declare
                             specific object variables. This is an easier method of programming foreign objects because
                             the Visual Basic Editor will display the same programming help regarding the foreign object
                             that it would display for the object belonging to the application you are working from.
                             Before programming the procedure, add the appropriate reference. Follow these steps to add
                             a reference to Microsoft Outlook.

                               1  Open the Visual Basic Editor.
                               2  Select the References option from the Tools menu.
                               3	 Scroll through the available references until you find the Microsoft Outlook Object
                                  Library.
                               4  Check the box beside the reference.
                               5  Click OK to close the References dialog box.
                             Figure 21-3, displays the References dialog box with the Outlook Object Library selected.


                452
             Part 6:  Excel and the Outside World: Collaborating Made Easy
   473   474   475   476   477   478   479   480   481   482   483