The default file-type listing that opens in SelectFile() is decided by which of the Filters.Add code lines appears first in the sequence. Just copy the entire code listing into a standard module for use, and comment out the API version that is unwanted, assuming that an API is used at all. All three can be run from the test procedure. Although these two look a bit similar, it is important to choose the right one for your version of MS Office. For completeness, another version of the API for 64 bit systems has been added at the foot of the page. The two dialogs ''SelectFolder()'' and ''SelectFile()'' will work with both 32 bit and 64 bit version of MS Office, but the API procedure ''BrowseFolder()'' is not intended for 64 bit working it works only in 32 bit systems. When a folder is selected, the returned string does not include the end backslash the user needs to add that himself. They are not much different to the dialogs that Windows uses, and each of them works by returning a full path string to the chosen item. At times we need to access files and folders to provide input for procedures, and the code below will do this.
0 Comments
Leave a Reply. |