Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Password set/clear macros - help!
Hi all,
I would like to implement two custom toolbar buttons to allow colleagues on a committee to easily set and clear workbook passwords. They use a mix of Excel 2000 and 2002. Setting a password would work something like this: 1. The person opens the workbook. 2. At any time during editing, the person presses the "set password" button to set the password. If this is the first time the button is pressed after Excel is started, then prompt for the password. Subsequent presses of the button will apply the same password to the active workbook without prompting. 3. When finished editing, the person saves and closes the workbook, which applies the password. This is easily done in Excel 2002. I simply set the ActiveDocument.Password (or ActiveWorkbook.Password) property and the password is applied when the document or workbook is next saved (the same is true for both Word 2000 and 2002). However there is no such property in Excel 2000; it seems the password can only be applied using the SaveAs method. I would like this to work the same way in both versions of Excel. I started looking at workbook BeforeSave events, but that's getting complicated. Oh, and the macros/custom toolbar would need to be loaded from an add-in, since I want them to be usable on any workbook. And it would be nice if the "set password" button could be highlighted in some way if the active workbook has a password set. Thanks, Ken. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run Macros in a Password-protected workbook? | Excel Discussion (Misc queries) | |||
Password protect macros in Excel | Excel Discussion (Misc queries) | |||
Clear Macro & Password Protection | Excel Discussion (Misc queries) | |||
how to hide a list of macros without password protection | Excel Worksheet Functions | |||
Password protect a sheet without Macros | Excel Discussion (Misc queries) |