Sometimes it is necessary to get a folder path from the user instead of receiving a file path.
The Excel Application class is providing a corresponding function, which is used in below method.
All three parameters are optional.
FileDialog can be used either to get a specific file path or to get a directory path. This is controlled using two constants, in this case msoFileDialogFolderPicker.
I am lazy and do not want to hand a lot of parameters to functions having to remember what I have to hand in certain cases to get the result I want. I want to call one function for one very simple purpose.
Therefore I deceided to split the same function into two methods using two different constants to achieve similar tasks. Hence the file picker dialog is build using a similar method.