Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default File Read-Only Status

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 =---
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default File Read-Only Status


"Nigel" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default File Read-Only Status

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" wrote in message
...
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

=---


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default File Read-Only Status

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

"JON JON" wrote in message
...
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" wrote in message
...
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
=---






----== 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 =---
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
How can I toggle in and out of read-only status in an Excel file? SS Excel Discussion (Misc queries) 3 April 11th 09 04:50 PM
Help! How to Remove Read Only Status on a Worksheet Leslie at the Bank Excel Worksheet Functions 1 March 7th 07 08:22 PM
How do I clear read-only status on a workbook file? Karin Excel Discussion (Misc queries) 1 March 2nd 07 04:55 PM
Remove Read Only Status on Excel Templates Dia Excel Discussion (Misc queries) 0 March 10th 06 04:25 AM
How do I print the read-only status of Excel file? Kyla Excel Discussion (Misc queries) 0 October 18th 05 06:51 PM


All times are GMT +1. The time now is 09:02 PM.

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"