Issues saving Protected .xlam

Todkerr

New Member
Joined
Nov 10, 2009
Messages
7
Hi all.

I have an .xlam file that is password protected for viewing.

At times the .xlam accepts user inputs and saves itself to archive the inputs. (This is accomplished with simple thisworkbook.save statements in applicable code, as well as a redundant worksheet_save private function for the edited worksheet.)

If I exit out of Excel by closing the Excel window, Excel generates the customary "save?" queries for open and unsaved workbooks. Then at the end of clearing that out, Excel requires the password for the .xlam file - which I do not want to happen, of course.

I have added statements like "thisworkbook.saved = true" to run when the .xlam is edited - and I know that those statements are executing (as well as the thisworkbook.save statements) since subsequent code send flags to the debugger indicating that it ran.)

If I remove the password protection from the .xlam and close Excel under the same conditions, I do NOT get a request to save changes to the .xlam.

So with the password prtection on, Excel sees the .xlam file as NOT saved. Without the password, Excel sees the .xlam as saved.


Anyone have thoughts on how to work around this problem? A fairly lengthy on-line search did not show show help for the exact same problem.

Many thanks in advance.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top