Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default stop excel file opened as read only if already opened by another u

hello,

how do i prevent an excel file being opened as read only if the file is
already opened by another user. this particular file is on the file server
and accessed by multiple users.

What I want is an alert if the file is already opened which says the file
cannot be opened as read only and click ok to close. the alert to inlcude the
username who has the file opened.

workbook sharing is not an option as it breaks my various vba macros

appreciate any help...

cheers
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default stop excel file opened as read only if already opened by another u

Play with this code (place it in your wb open code)

If ActiveWorkbook.ReadOnly Then ActiveWorkbook.Close FalseEnd If
--
steveB

Remove "AYN" from email to respond
"bobm" wrote in message
...
hello,

how do i prevent an excel file being opened as read only if the file is
already opened by another user. this particular file is on the file server
and accessed by multiple users.

What I want is an alert if the file is already opened which says the file
cannot be opened as read only and click ok to close. the alert to inlcude
the
username who has the file opened.

workbook sharing is not an option as it breaks my various vba macros

appreciate any help...

cheers



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default stop excel file opened as read only if already opened by anoth

thanks ...that works
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default stop excel file opened as read only if already opened by anoth

You're very Welcome!

Keep on Exceling....

--
steveB

Remove "AYN" from email to respond
"bobm" wrote in message
...
thanks ...that works



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
2003 Can I stop the 'update links' option when file is opened? ajnmxx Links and Linking in Excel 1 October 31st 09 02:47 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
Excel file opened as read-only, if saved by another user GeEf Excel Discussion (Misc queries) 2 August 28th 05 04:29 PM
Is Workbook read-only because of file permission or because file is already opened? balexis Excel Programming 0 September 29th 04 02:29 PM
Excel ADO connection opens read-only instance of opened Excel Serge L Excel Programming 6 September 23rd 03 07:39 PM


All times are GMT +1. The time now is 10:15 PM.

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"