LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Set as read only based on user name.


Hi all,

I need to restrict access to a workbook based on the user name of the
person opening the workbook. I don't want to use passwords and
protection as I don't need that file to be all that secure. So I've got
the following macro to change the status of the sheet based on the user
name.

This seems to work but it is possible to change the user name in
Tools\Options and reopen the sheet with write access.

Private Sub workbook_open()

Select Case Application.UserName
Case Is = "Pippa"
End
Case Else
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End Select

End Sub

Any better suggestions?
Thanks in advance


--
skuzapo
------------------------------------------------------------------------
skuzapo's Profile: http://www.excelforum.com/member.php...o&userid=27430
View this thread: http://www.excelforum.com/showthread...hreadid=475174

 
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
Spreadsheet defaults to Read Only for ONE user... DS Excel Discussion (Misc queries) 6 July 12th 06 02:50 PM
Spreadsheet defaults to read-only for ONE user only?? DS Excel Discussion (Misc queries) 3 July 4th 06 04:58 PM
Set as read only based on user name. swatsp0p[_26_] Excel Programming 0 October 11th 05 08:32 PM
New user help and Excel read question (Interop and OleDb) sporadic Excel Programming 0 June 2nd 05 08:18 PM
Can I set up a worksheet as read only for one user Classic Excel Programming 1 December 7th 04 04:18 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"