Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default 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/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 ronhansen Excel Discussion (Misc queries) 1 November 15th 09 09:33 PM
Pivot Table Report Filter - "OR" instead of "AND" Multiple Filters tommcbrny Excel Discussion (Misc queries) 1 October 29th 09 03:08 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Multiple "source" workbooks linked to single "destination" workboo DAVEJAY Excel Worksheet Functions 1 September 17th 07 05:33 PM
freeze window creates multiple "views" suffixed with ":n" dgaex001 Excel Discussion (Misc queries) 5 March 22nd 06 05:28 PM


All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"