Learning the nuances of VBA can be as difficult as learning the details of any human language. Fortunately, VBA includes an extremely thorough dictionary that lists all valid commands. Granted, the dictionary doesn't have descriptions of what all those commands mean, but you can often deduce those meanings by seeing the commands themselves.
Microsoft calls the giant dictionary an object browser, and it opens up the entire world of object models—not just the ones for Office and your favored variety of VBA, but for any program that can be called from VBA, using the CreateObject() function.
Select the programs you want to browse by choosing Tools, References (see Figure 41.7).
Press F2 to display the Object Browser (see Figure 41.8).
Select the application that interests you in the Library box, and all the valid commands for that application appear. You can even look for a specific word or string of characters, by typing them in the Search box and clicking the Search button.
If you double-click an object, all the valid properties, methods, and events associated with the object appear on the right. In Figure 41.8, Document.Close shows up as a valid Object.Method pair, and its parameters appear at the bottom of the screen. Choose an object, property, method, or event and press F1 to see context-sensitive help.
To dismiss the Object Browser, press F7 or choose View, Code.
3.16.51.157