Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing a Password to open a file in Personal XLA

Status
Not open for further replies.

DoctorV3774

Programmer
Oct 12, 2004
33
0
0
US
We have a sensitive workbook we send to many users in our organization. Certain users should always be able to open it. It prompts for a password on open. What I wanted to do was to store a macro in these specific users Personal XLA that any time a workbook opens with a Password Prompt it automatically fills in the password and/or opens the workbook for them without them having to remember what the password is. We just wanted to distribute some sort of macro that they store on their Personal XLA that says on Password Prompt fill in the word TopSecret

Is there any way to do this?

Thanks
 
To the best of my knowledge there isn't any event that is started upon opening of another workbook.

However, a way to get around this:

a workbooks_open event in the file that promts for password, that states that some usernames are excluded from the password prompt:

Code:
if not application.username = "01Patrik" then

{your password prompt}

end if

This is not totally secure since people can change their username, but if no-one tells about the functionality, no-one will know as long as you password protect the VBA project.

// Patrik
______________________________

To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the IT Professional, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top