PC Review


Reply
Thread Tools Rate Thread

Automatic Password Protect Sheet

 
 
Lorcan Dene
Guest
Posts: n/a
 
      10th Dec 2008
I've coded a button to open a file, copy some info from 1 sheet to another,
but i need the button to first unprotect the sheet, then do its copying, then
protect the sheet when finsihed.

i've tried:

Worksheets("Sheet1!").Protect (password)
and hence
WorkSheets("Sheet1!").UnProtect (password)

but it doesnt password protect it, only protects it normally, anyone help
please?
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      11th Dec 2008
Sheets("Sheet1").Unprotect Password:="justme"

your code to do things

Sheets("Sheet1").Protect Password:="justme"


Gord Dibben MS Excel MVP

On Wed, 10 Dec 2008 15:22:05 -0800, Lorcan Dene
<(E-Mail Removed)> wrote:

>I've coded a button to open a file, copy some info from 1 sheet to another,
>but i need the button to first unprotect the sheet, then do its copying, then
>protect the sheet when finsihed.
>
>i've tried:
>
>Worksheets("Sheet1!").Protect (password)
>and hence
>WorkSheets("Sheet1!").UnProtect (password)
>
>but it doesnt password protect it, only protects it normally, anyone help
>please?


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
password protect a sheet Joe Microsoft Excel Misc 5 27th Oct 2008 11:14 PM
protect sheet with password pswanie Microsoft Excel Programming 2 30th Dec 2007 05:14 PM
Protect sheet without password? =?Utf-8?B?RWxsZW5N?= Microsoft Excel Misc 2 21st Jun 2007 03:22 PM
Password Protect a Sheet =?Utf-8?B?THlubg==?= Microsoft Excel Misc 1 27th Oct 2006 03:41 PM
Protect Sheet with password through VBA =?Utf-8?B?YmlsbF9tb3JnYW5fMzMzMw==?= Microsoft Excel Programming 2 24th Dec 2004 04:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:02 PM.