ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   FileDialog Help (https://www.excelbanter.com/excel-programming/305937-filedialog-help.html)

Maynard

FileDialog Help
 
I'm writing an FTP add-in for my group. I'm using FileDialog(msoFileDialogFilePicker) to browse a mock directory of a filelist I've ftp-ed from a remote host. The first execution of this code opens the FileDialog dialog in the top-level folder I've set using ChDir. However, if I execute this code a second time, the FileDialog dialog defaults to the last selected folder (from the previous execution). I've tried using the .InitialFileName property, but that will not work because of the logic in my code (I actually have to call the FileDialog several times depending on if I click on a folder instead of a file...I have to ftp a new directory list if I select a folder instead of a file...since the FileDialog can't return a folder name and a file name...it's one or the other...e.g., msoFileDialogFilePicker and msoFileDialogFolderPicker, but not msoFileDialogFileFolderPicker). I've also tried to make good use of ChDir, but that isn't solving the problem either. Any suggestions?


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com