Gerald Higgins
Well-known Member
- Joined
- Mar 26, 2007
- Messages
- 9,258
Hi all, did a search, found this
http://www.mrexcel.com/forum/showthread.php?t=370089&highlight=force+read
which got me half way there, but looking for help on the last bit.
I've got a file which I would like to set up so that certain specified users can only open it as read only, while other specified users can open a read/write version.
I don't really mind which way round this works - either I would specify the read only users, and all others would be read/write by default, OR I'd be happy to specify the users who could read/write, and all others would be read only by default.
I adapted the code in that other thread to this,
which works. I've incorporated it into the Auto Open routine, and it correctly makes the file read only.
What I want to do is add something that says effectively...
If user = John Smith, Jane Brown
open the file as read only
else
and I need help with the bit in bold.
Any ideas ?
Thanks in advance...
http://www.mrexcel.com/forum/showthread.php?t=370089&highlight=force+read
which got me half way there, but looking for help on the last bit.
I've got a file which I would like to set up so that certain specified users can only open it as read only, while other specified users can open a read/write version.
I don't really mind which way round this works - either I would specify the read only users, and all others would be read/write by default, OR I'd be happy to specify the users who could read/write, and all others would be read only by default.
I adapted the code in that other thread to this,
Code:
If Not ActiveWorkbook.ReadOnly Then
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
What I want to do is add something that says effectively...
If user = John Smith, Jane Brown
open the file as read only
else
and I need help with the bit in bold.
Any ideas ?
Thanks in advance...