#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Read/Write Alert

Many users access data for my application. The data is stored on seperate xl
files. These data files only open long enough for information to be retrieved
form or saved to, then the file is closed. If by chance the file to be opened
is already open by another user and in a Read Only state, my application
displays a MsgBox to "try again". However, a default windows message appears
well after this event, advising that the file is now Read Write and available.
Is there any way to prevent this Windows message from appearing, similar to
setting DisplayAlerts to false?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Read/Write Alert

If you only need to read the file, you can open it in readonly mode. There's an
option on the workbooks.open statement that you can read about in VBA's help.

If you have to update the file, you can test to see if the file is in use
elsewhe

Macro Code to Check Whether a File Is Already Open
http://support.microsoft.com/?kbid=138621



GrantW wrote:

Many users access data for my application. The data is stored on seperate xl
files. These data files only open long enough for information to be retrieved
form or saved to, then the file is closed. If by chance the file to be opened
is already open by another user and in a Read Only state, my application
displays a MsgBox to "try again". However, a default windows message appears
well after this event, advising that the file is now Read Write and available.
Is there any way to prevent this Windows message from appearing, similar to
setting DisplayAlerts to false?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Read/Write Alert

Excellent, thanks Dave.
I was having the file opened, then checking If ActiveWorkbook.ReadOnly,
which if Yes, set off an auto response later on from Windows that the read
only file was now available, which was creating confusion for the users.
Gold Star for you :)

"Dave Peterson" wrote:

If you only need to read the file, you can open it in readonly mode. There's an
option on the workbooks.open statement that you can read about in VBA's help.

If you have to update the file, you can test to see if the file is in use
elsewhe

Macro Code to Check Whether a File Is Already Open
http://support.microsoft.com/?kbid=138621



GrantW wrote:

Many users access data for my application. The data is stored on seperate xl
files. These data files only open long enough for information to be retrieved
form or saved to, then the file is closed. If by chance the file to be opened
is already open by another user and in a Read Only state, my application
displays a MsgBox to "try again". However, a default windows message appears
well after this event, advising that the file is now Read Write and available.
Is there any way to prevent this Windows message from appearing, similar to
setting DisplayAlerts to false?


--

Dave Peterson

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
I have a read only xl file, I need it to be read and write drama queen Excel Discussion (Misc queries) 3 July 1st 06 12:25 AM
Read-write/Read-only Jillian Excel Discussion (Misc queries) 4 February 16th 06 05:26 PM
read only file-need to write judithbear Excel Discussion (Misc queries) 4 January 17th 06 03:31 PM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM
Why can't I write in a document that is not read only? DLD Excel Worksheet Functions 1 November 18th 05 10:34 PM


All times are GMT +1. The time now is 03:07 AM.

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"