O'Reilly logo

Excel 2003 VBA Programmer's Reference by Robert Rosenberg, Rob Bovey, John Green, Stephen Bullen, Paul T. Kimmel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25

Office Files and Folders

Most of the objects discussed in this book come from the Excel Object Model. That is not the only object model available when you are writing Excel VBA code. A number of object models, or type libraries, are automatically associated with each Excel VBA project. You can see them listed in the drop-down menu at the top of the Object Browser or by clicking Tools images References in the VB Editor window and noting the libraries with check marks. There are libraries for Excel, VBA, Office, OLE Automation and, if you attach a UserForm, there will be a Forms library. You can attach more libraries by checking items in the Tools images References dialog box. This process is discussed in later chapters such as Customizing the VBE.

The Office Object Model is made available to all Microsoft Office applications. It contains objects that are used by all Office applications such as CommandBars, which are discussed in Chapter 26. In this chapter, we will examine two objects contained in the Office Object Model that you use to search for, open and save files and the properties associated with them:

  • FileSearch
    • FoundFiles
    • PropertyTests
    • FileTypes
    • SearchScopes
    • ScopeFolders
    • SearchFolders
  • FileDialog
    • FileDialogFilters
    • FileDialogSelectedItems

FileSearch was introduced in Office 97 and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required