Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Marco to protect / unprotect worksheet

Sub UnProtect()

ActiveSheet.UnProtect Password:="snow"

Run some code to do things and when complete reprotect

ActiveSheet.Protect Password:="snow"

End Sub


Gord Dibben MS Excel MVP

On Sun, 24 Jan 2010 12:55:04 -0800, ordnance1
wrote:

How can I edit the code below to enter the password snow (I use a password on
the protected sheet to keep people from makeing unwanted changes)

Also I need code to reprotect the worksheet at the end addining the password
snow.

Sub Macro1()
'
' Macro1 Macro
'

'
ActiveSheet.Unprotect
End Sub


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
Marco to protect / unprotect worksheet Mike H Excel Programming 0 January 24th 10 09:14 PM
Protect/ unprotect worksheet cc Excel Discussion (Misc queries) 0 October 19th 07 09:27 PM
How do I unprotect/with password to run marco and protect J_Will[_2_] Excel Programming 9 February 13th 06 09:56 PM
protect/unprotect worksheet Alex Excel Programming 2 September 9th 05 06:40 PM
Protect/Unprotect Worksheet djn Excel Discussion (Misc queries) 1 May 12th 05 11:27 PM


All times are GMT +1. The time now is 09:23 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"