Results 1 to 2 of 2
2006-07-18, 18:03 #1
- Join Date
- Nov 2002
- Thanked 0 Times in 0 Posts
Coding features of Ecryption (Excel 2000 - 2003)
I am speaking from using Excel 2003 but supposedly some of the encryption saving features of Excel is also in Excel 2000. Anyway there are operation and code features of the saving of an Excel workbook using encryption that I would like to access from code but haven't been able to.
One feature is when an Excel workbook is saved encrypted and an attempt is made to open it and the attempt fails many of the menu items and toolbar buttons are disabled and this works on Excel 2000 as well. I can duplicate saving an Excel workbook with specific menu and toolbars disabled and if opened again they remain disabled without affecting menu and toolbars when opening other Excel workbooks during the same session. I perform the disabling of menu and toolbar items during the before save and one thing that is a problem is that the specific menu and tool bar items remain disabled after the save and there isn't a "after save" event. When doing a saveas using encryption I can see the toolbar items going disabled right before the workbook is saved and then coming back after the save and I am not sure how that is being done.
Another feature I would like to implement is being able to control the using of encryption passwords via code rather than having the user type them in. There doesn't appear to be any workbook events that occur before the prompt for encryption passwords dialog but I can code the use of passwords during the save. Is there some way to send in the passwords via code rather than having the user do it, i.e. are there events that be caught prior to the password dialog upon opening?
2006-07-18, 18:43 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Coding features of Ecryption (Excel 2000 - 2003)
About your latter question: the Workbooks.Open method has arguments to let you specify a password to open the workbook and a password to edit the workbook.