Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Detecting open workbook

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nigel RS - 12 Sep 2007 17:04 GMT
My application is stored on a server that can be accessed by a number of users.

When the workbook is already in open by a user and another person opens it,
they get the warning to either not open, be notified or open as read only.

How can I detect this and force the workbook to open as read only in VBA code?

I need to detect it as I want to control the workbook save/close events and
ignore any changes.

Cheers
Tom Ogilvy - 12 Sep 2007 17:30 GMT
I am not sure you can detect that, but in the events you can do

if thisworkbook.ReadOnly then exit sub

Signature

Regards,
Tom Ogilvy

> My application is stored on a server that can be accessed by a number of users.
>
[quoted text clipped - 7 lines]
>
> Cheers
Nigel RS - 13 Sep 2007 07:28 GMT
Hi Tom
That is a pity.  What you are saying is that after the user chooses READ
ONLY, only then can I detect a read open status.

Is there another way of testing if a server file is already open?  I could
then create a local application that runs a test before it goes off and opens
the remote file. Or do I run into the same issue again?

Cheers
Nigel

> I am not sure you can detect that, but in the events you can do
>
[quoted text clipped - 11 lines]
> >
> > Cheers
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.