PC Review


Reply
Thread Tools Rate Thread

Detecting open workbook

 
 
=?Utf-8?B?TmlnZWwgUlM=?=
Guest
Posts: n/a
 
      12th Sep 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      12th Sep 2007
I am not sure you can detect that, but in the events you can do

if thisworkbook.ReadOnly then exit sub

--
Regards,
Tom Ogilvy


"Nigel RS" wrote:

> 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
>

 
Reply With Quote
 
=?Utf-8?B?TmlnZWwgUlM=?=
Guest
Posts: n/a
 
      13th Sep 2007
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

"Tom Ogilvy" wrote:

> I am not sure you can detect that, but in the events you can do
>
> if thisworkbook.ReadOnly then exit sub
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Nigel RS" wrote:
>
> > 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
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not detecting Open Workbook - Why Roger Microsoft Excel Misc 7 26th Jan 2008 08:16 PM
Not Detecting Open Workbook Status - Odd?? Jenny B. Microsoft Excel Misc 4 16th Jan 2008 12:47 AM
Detecting if a Window/Workbook is Open =?Utf-8?B?Um9i?= Microsoft Excel Misc 5 10th Jul 2007 10:52 PM
Open a specific workbook...find value from other open workbook and then insert cells values in cell next to it. amorrison2006@googlemail.com Microsoft Excel Programming 1 13th May 2007 01:46 PM
Detecting if Excel Workbook is already open RzB Microsoft Access VBA Modules 4 22nd Dec 2003 11:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:46 AM.