File Read-Only Status

  • Thread starter Thread starter Nigel
  • Start date Start date
N

Nigel

I have an application where a number of network connected users that might
want to open it. If the application is already in use, then as normal the
new user is told it is in use and they can open it as 'read-only'. This is
OK but is there a way in VBA to detect that the file is open as read-only
which I can use to prevent changes and saving of this version of the file ?

TIA
Nigel
 
Nigel said:
I have an application where a number of network connected users that might
want to open it. If the application is already in use, then as normal the
new user is told it is in use and they can open it as 'read-only'. This is
OK but is there a way in VBA to detect that the file is open as read-only
which I can use to prevent changes and saving of this version of the file ?

TIA
Nigel
I think you are looking for

Thisworkbook.Readonly

Geoff
 
Choose to any sample line of code

If ThisWorkbook.ReadOnly = False Then MsgBox "Read\write"
If ActiveWorkbook.ReadOnly = False Then MsgBox "Read\write"
If Workbooks("Book2.xls").ReadOnly = False Then sgBox "Read\write"


Nigel said:
I have an application where a number of network connected users that might
want to open it. If the application is already in use, then as normal the
new user is told it is in use and they can open it as 'read-only'. This is
OK but is there a way in VBA to detect that the file is open as read-only
which I can use to prevent changes and saving of this version of the file ?

TIA
Nigel




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
Thanka guys for the tips. Secondary question, when the file is already
open, the message the use gets includes an option to choose either read-only
or read-olny and advise when remote user releases the file. Can the later
be intercepted ?

Cheers
Nigel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top