Directory "Locked" when selecting multiple files using GetOpenFilename
Dim FilesToOpen As Variant
FilesToOpen = Application. _ GetOpenFilename("log files (*.log), *.log", 1, "Select any log file", , True) After user selects the (multiple) files, the directory (folder) that contains those files is "locked" for renaming, deleting etc. (Sharing violation. source or destination file may be in use.) Closing the file within Excel doesn't "unlock" the directory. MS Excel has to be closed. I have no other lines in the macro. I am using MS Excel 2000 with Windows 2000. Please help. Thanks. --- Message posted from http://www.ExcelForum.com/ |
Directory "Locked" when selecting multiple files using GetOpenFilename
This is because GetOpenFilename makes the selected directory the current directory. Add something like ChDir "C:\" and the originally selected directory should be unlocked. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "esbey " wrote in message ... Dim FilesToOpen As Variant FilesToOpen = Application. _ GetOpenFilename("log files (*.log), *.log", 1, "Select any log file", , True) After user selects the (multiple) files, the directory (folder) that contains those files is "locked" for renaming, deleting etc. (Sharing violation. source or destination file may be in use.) Closing the file within Excel doesn't "unlock" the directory. MS Excel has to be closed. I have no other lines in the macro. I am using MS Excel 2000 with Windows 2000. Please help. Thanks. --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 09:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com