View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
iperlovsky iperlovsky is offline
external usenet poster
 
Posts: 50
Default 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 -