ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change passwords on fly (https://www.excelbanter.com/excel-programming/396169-change-passwords-fly.html)

XP

Change passwords on fly
 
Using Office 2003 and Windows XP;

Is it possible to code a workbook to alter or change its sheet, workbook,
and module protection passwords on the fly? I would like to tie the change
trigger to the workbook's Open event.

I already know about the weaknesses involved in using Office passwords; this
is just an extra measure to go one step further to prevent prying eyes and
mistakes;

Example VBA would be most appreciated.

Tom Ogilvy

Change passwords on fly
 
You can turn on the macro recorder and make the changes manually. This will
give you the code you need. You would simply call such code from the
workbook_open event. Keeping the new password would require saving the
workbook.

At least for sheet level protection, you would need to unprotect the sheet
using the existing password, then reprotect it with a new password. I would
suspect this would be the case for other passwords as well.

--
Regards,
Tom Ogilvy


"XP" wrote:

Using Office 2003 and Windows XP;

Is it possible to code a workbook to alter or change its sheet, workbook,
and module protection passwords on the fly? I would like to tie the change
trigger to the workbook's Open event.

I already know about the weaknesses involved in using Office passwords; this
is just an extra measure to go one step further to prevent prying eyes and
mistakes;

Example VBA would be most appreciated.



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com