Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default 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,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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,


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default 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,



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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 -


  #5   Report Post  
Posted to microsoft.public.excel.programming
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 -





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Message Box on exiting workbook cufc1210 Excel Discussion (Misc queries) 1 September 30th 09 02:39 PM
Unprotecting Workbook Please Help Excel Programming 3 November 1st 06 05:39 AM
unprotecting workbook Jeff Excel Programming 2 December 10th 03 04:11 PM
Exiting a workbook Dick Kusleika Excel Programming 0 August 15th 03 05:30 PM
Exiting a workbook John Wilson Excel Programming 0 August 15th 03 04:43 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"