Hello stephme55,
Here is the breakdown...
CreateObject - Creates and returns a reference to a new instance of the specified ActiveX object. This macro creates a Shell Application object.
BrowseForFolder - A Shell Application method to view and select folders using a customizable user interface.BrowseForFolder takes 4 arguments. The fourth is optional.
The 1st is the Window handle to the parent window of the dialog box. Just uses zero for this argument.
The 2nd is the Tile you want to display at the top of the dialog box.
The 3rd argument is an Integer value that contains the options for displaying the dialog box. This can be zero or a combination of the values listed under the ulFlags member of the BROWSEINFO structure. In this macro 17 represents the following flags: BIF_RETURNONLYFSDIRS (1) + BIF_EDITBOX (16). The dialog box will list only directories (Folders) and provide a text box for the user to type in a folder path.
The 4th argument is the root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not specified, the root folder used is the desktop. This value can be a string that specifies the path of the folder or one of the ShellSpecialFolderConstants values.
Namespace - A Namespace is used to create the scope for organizing code elements and to create globally unique types. In this macro the Namespace is the Folder.The Namespace takes a single argument of the Type Variant. A Namespace in Windows can be a string or a numeric Shell Special Folder constant or a GUID.
Folder.Items - Returns the collection of File, Folders, and Links within a folder.
Filter - A method to select only the Folder Items of interest.Filter take 2 arguments: Shell Constant Flag, Filter String. There are only 2 flags that are useful for files and folders: SHCONTF_FOLDERS = 32 and SHCONTF_NONFOLDERS = 64. The filter syntax follows the same rules as the filter in Application.GetOpenFilename.
Bookmarks