Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
ijb ijb is offline
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
XLS password protected file JacquesT Excel Discussion (Misc queries) 5 December 25th 08 02:02 PM
Link to a password protected file Holly Excel Discussion (Misc queries) 1 November 14th 07 12:36 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM
bypass password when update linking of password protected file Yan Excel Discussion (Misc queries) 1 February 7th 05 11:29 PM
VBa, Password protected sheet fails to get unprotected with the same password Hans Rattink Excel Programming 3 July 28th 03 02:30 PM


All times are GMT +1. The time now is 01:51 PM.

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

About Us

"It's about Microsoft Excel"