Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save protected file into unprotected file without password
I have a master workbook file which is password protected.
I want to create a procedure that a user access and save the protected template file into his/her own unprotected file before he/she start updating the file without password entry. I have recorded an "ActiveSheet.Unprotect" macro. However, I was ask to enter the "Password" when I ran the macro. Is it possible to create a macro which unprotects and saves the file into a new unprotected file without password entry? There is no purpose protecting the file if I have to let all users know the password. Thanks, Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save protected file into unprotected file without password
Paul,
if you put the unprotect password into your Activesheet.Unprotect macro and then password protect that module - this will keep the password secret (your users will be able to modify the spreadsheets but won't be able to see the code which unprotects them) Hope this is clear - if not I can write the code for you and post it. -- If I've mis-understood the question please tell me. HTH ijb Remove nospam from my e-mail address to talk direct Not MCSD, MVP, TLA, P&P, PCMCIA, etc just trying to help "Paul" wrote in message ... I have a master workbook file which is password protected. I want to create a procedure that a user access and save the protected template file into his/her own unprotected file before he/she start updating the file without password entry. I have recorded an "ActiveSheet.Unprotect" macro. However, I was ask to enter the "Password" when I ran the macro. Is it possible to create a macro which unprotects and saves the file into a new unprotected file without password entry? There is no purpose protecting the file if I have to let all users know the password. Thanks, Paul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save protected file into unprotected file without password
With Activesheet 'maybe worksheets("sheet1") to be careful???
.unprotect password:="topsecret" 'do your stuff .protect password:="topsecret" end with When you record the macro, the password parm doesn't get recorded. But it's there in the help. And to add to IJB's response, you'll want to protect the project. Inside the VBE, click on tools|VBA Project Properties|protection Tab. Give it a nice password and click lock for viewing. (And remember this password--it can be different from the worksheet's password.) All that said, there are routines posted here several times a week that will crack worksheet protection. And pointers to commercial password breakers for your VBA code (inexpensive, too). Paul wrote: I have a master workbook file which is password protected. I want to create a procedure that a user access and save the protected template file into his/her own unprotected file before he/she start updating the file without password entry. I have recorded an "ActiveSheet.Unprotect" macro. However, I was ask to enter the "Password" when I ran the macro. Is it possible to create a macro which unprotects and saves the file into a new unprotected file without password entry? There is no purpose protecting the file if I have to let all users know the password. Thanks, Paul -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save protected file into unprotected file without password
Here is a possible approach:
Sub Tester2() workbooks("Master.xls").Activate Set sh = ActiveSheet Workbooks.Add xlWBATWorksheet With sh .Cells.Copy ActiveSheet.Cells End With End Sub alter to copy each sheet if the workbook is multiple sheets. Regards, Tom Ogilvy Paul wrote in message ... I have a master workbook file which is password protected. I want to create a procedure that a user access and save the protected template file into his/her own unprotected file before he/she start updating the file without password entry. I have recorded an "ActiveSheet.Unprotect" macro. However, I was ask to enter the "Password" when I ran the macro. Is it possible to create a macro which unprotects and saves the file into a new unprotected file without password entry? There is no purpose protecting the file if I have to let all users know the password. Thanks, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
XLS password protected file | Excel Discussion (Misc queries) | |||
Link to a password protected file | Excel Discussion (Misc queries) | |||
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. | Excel Worksheet Functions | |||
bypass password when update linking of password protected file | Excel Discussion (Misc queries) | |||
VBa, Password protected sheet fails to get unprotected with the same password | Excel Programming |