ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unprotecting a Workbook before exiting (https://www.excelbanter.com/excel-programming/413516-unprotecting-workbook-before-exiting.html)

iperlovsky

Unprotecting a Workbook before exiting
 
Does anyone know what line of VB code would unprotect the workbook before
closing the file - such that the next time you open it you are not prompted
for a password.

Thanks,


[email protected]

Unprotecting a Workbook before exiting
 
Hi
Activeworkbook.Unprotect Password:="whatever"
regards
Paul

On Jul 3, 3:01*pm, iperlovsky
wrote:
Does anyone know what line of VB code would unprotect the workbook before
closing the file - such that the next time you open it you are not prompted
for a password.

Thanks,



iperlovsky

Unprotecting a Workbook before exiting
 
I think I need to restate my objective. I need to remove/disable/change the
workbook password from "x" to "". In other words, when I close the workbook
after running the macro and reopen it, I will not be prompted for a password
to enter the workbook.

" wrote:

Hi
Activeworkbook.Unprotect Password:="whatever"
regards
Paul

On Jul 3, 3:01 pm, iperlovsky
wrote:
Does anyone know what line of VB code would unprotect the workbook before
closing the file - such that the next time you open it you are not prompted
for a password.

Thanks,




[email protected]

Unprotecting a Workbook before exiting
 
Hi
Activeworkbook.Unprotect Password:="x"
Activeworkbook.Protect Password:=""
Activeworkbook.Unprotect Password:=""

regards
Paul
On Jul 3, 3:40*pm, iperlovsky
wrote:
I think I need to restate my objective. I need to remove/disable/change the
workbook password from "x" to "". *In other words, when I close the workbook
after running the macro and reopen it, I will not be prompted for a password
to enter the workbook.



" wrote:
Hi
Activeworkbook.Unprotect Password:="whatever"
regards
Paul


On Jul 3, 3:01 pm, iperlovsky
wrote:
Does anyone know what line of VB code would unprotect the workbook before
closing the file - such that the next time you open it you are not prompted
for a password.


Thanks,- Hide quoted text -


- Show quoted text -



iperlovsky

Unprotecting a Workbook before exiting
 
This does not work because I am still prompted for a password when I open the
workbook. Anyway to disable the workbook password protection (under the
tools-options-security menu) rather than change the password to be nothing?

" wrote:

Hi
Activeworkbook.Unprotect Password:="x"
Activeworkbook.Protect Password:=""
Activeworkbook.Unprotect Password:=""

regards
Paul
On Jul 3, 3:40 pm, iperlovsky
wrote:
I think I need to restate my objective. I need to remove/disable/change the
workbook password from "x" to "". In other words, when I close the workbook
after running the macro and reopen it, I will not be prompted for a password
to enter the workbook.



" wrote:
Hi
Activeworkbook.Unprotect Password:="whatever"
regards
Paul


On Jul 3, 3:01 pm, iperlovsky
wrote:
Does anyone know what line of VB code would unprotect the workbook before
closing the file - such that the next time you open it you are not prompted
for a password.


Thanks,- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 07:09 AM.

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