Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Detecting open workbook

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Detecting open workbook

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Detecting open workbook

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
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
Not detecting Open Workbook - Why Roger Excel Discussion (Misc queries) 7 January 26th 08 08:16 PM
Not Detecting Open Workbook Status - Odd?? Jenny B. Excel Discussion (Misc queries) 4 January 16th 08 12:47 AM
Detecting if a Window/Workbook is Open Rob Excel Discussion (Misc queries) 5 July 10th 07 10:52 PM
detecting open excel apllications and api qn noel mcwilliam Excel Programming 3 November 16th 04 09:14 AM
Detecting open files R Avery Excel Programming 2 January 5th 04 05:25 PM


All times are GMT +1. The time now is 03:08 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"