ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving Protected Workbooks (https://www.excelbanter.com/excel-programming/365616-saving-protected-workbooks.html)

Sentinel

Saving Protected Workbooks
 
I have a problem I hope someone can help.

I have a workbook with a VBA project, both of which are password protected.
I want to progmatically save the changes to the workbook.

I can unprotect, change necessary cells, and then reprotect the workbook.
However I get an error message saying that the file cannot be saved when the
VBA project is protected. I cannot find any information as to how to
unprotect the VBA during saving and then reprotect.

Or am I going about this the wrong way.

Duncan[_5_]

Saving Protected Workbooks
 
I have had projects that would save with the VBA protected, maybe its
something else in your code, like perhaps trying to save while it is
running something in VBA?

Not sure, but it would help anyone reading this if you posted your code
that performed the actions, and show where it bugs out

Regards

Duncan


Sentinel wrote:

I have a problem I hope someone can help.

I have a workbook with a VBA project, both of which are password protected.
I want to progmatically save the changes to the workbook.

I can unprotect, change necessary cells, and then reprotect the workbook.
However I get an error message saying that the file cannot be saved when the
VBA project is protected. I cannot find any information as to how to
unprotect the VBA during saving and then reprotect.

Or am I going about this the wrong way.




All times are GMT +1. The time now is 04:15 AM.

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