pre-authorized to open a file without passwords?

C

CCrew2000

Does anyone know if it is possible to allow predetermined users to open an
Excel file without them having to use a password?

I've password protected a file and given out the password to a select few.
Unfortunutly, some people shared the password with others making the security
somewhat pointless.

The file is already around 8MB and I've heard a lot of issues with sharing
the file (speed and size growth of file).
 
G

Gord Dibben

You could place this event code into a dummy workbook which the users would
open.

If not on the list of users, the dummy would close after the message box is
clicked.

Private Sub Workbook_Open()
If Environ("UserName") = "Gord" Or Environ("UserName") = "Pete" Then
Workbooks.Open Filename:= _
"C:\Program Files\Microsoft Office\Exceldata\12months.xls", _
Password:="justme"
Else
MsgBox "You are not authorized to open 12months.xls"
ThisWorkbook.Close savechanges:=False
End If
End Sub

One of the better programmers will come along and show us how to put a list of
login names into an array.


Gord Dibben MS Excel MVP
 

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

Top