LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default File already in use by another user


Hi

We are using a VBA-Macro which opens about 180 files in order to updat
them. Sometimes it happens that one of those files, is already in use b
another user, then an error message appears which says “A file name
‘XY.xls’ already exists in this location. Do you want to replace it?
Then I press the “No” button. After that a Visual Basic error messag
pops-up “Run-time error’1004’: ‘XY.xls’ is read-only. To save a copy
click OK, then give the workbook a new name in the Save As dialo
box”.

The idea would be that the macro updates all 180 files unless one i
already in use. In this case the macro should just close the fil
without saving.

It would be great to get some help. Thanks a lot.

Michae

--
MichaelS
-----------------------------------------------------------------------
MichaelS_'s Profile: http://www.excelforum.com/member.php...fo&userid=2640
View this thread: http://www.excelforum.com/showthread.php?threadid=39680

 
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
User replaces existing file with blank during file open sjs Excel Discussion (Misc queries) 3 August 18th 08 06:16 PM
Prompt user to select file with default file selected dialog Bruce Cooley Excel Programming 0 September 15th 03 06:43 AM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:22 PM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:19 PM


All times are GMT +1. The time now is 06:36 AM.

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

About Us

"It's about Microsoft Excel"