Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Run Macros in a Password-protected workbook? JRSCEI Excel Discussion (Misc queries) 1 January 9th 10 10:27 PM
Password protect macros in Excel Greg Sottile Excel Discussion (Misc queries) 5 December 15th 09 01:23 PM
Clear Macro & Password Protection Mike Excel Discussion (Misc queries) 1 April 1st 08 01:14 AM
how to hide a list of macros without password protection Padam Excel Worksheet Functions 1 July 12th 06 11:30 AM
Password protect a sheet without Macros Cappa Excel Discussion (Misc queries) 3 May 27th 06 01:49 AM


All times are GMT +1. The time now is 01:55 AM.

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

About Us

"It's about Microsoft Excel"