ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening a file from a set folder (https://www.excelbanter.com/excel-programming/313848-opening-file-set-folder.html)

Mart

Opening a file from a set folder
 
Hi all...

I need to open files from folders x, y or z. When the file dialog opens it
either displayes the default path or the last used.

So how can I set the file dialog box to open from the desired folder.

Thanks
M.

Mart

Opening a file from a set folder
 
Well that proved to be easily done by ChDir.

Sorry...

M.



"Mart" wrote:

Hi all...

I need to open files from folders x, y or z. When the file dialog opens it
either displayes the default path or the last used.

So how can I set the file dialog box to open from the desired folder.

Thanks
M.


agarwaldvk[_39_]

Opening a file from a set folder
 

Dear M

Try this :-

Make the desired directory the current directory using the followin
statement in your sub :-

curdir (path)
then use the getopenfilename method

This will show the path that you have set as the current directory a
the default folder.


Best regards


Deepa

--
agarwaldv
-----------------------------------------------------------------------
agarwaldvk's Profile: http://www.excelforum.com/member.php...fo&userid=1134
View this thread: http://www.excelforum.com/showthread.php?threadid=27007



All times are GMT +1. The time now is 11:34 PM.

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