ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Marco to protect / unprotect worksheet (https://www.excelbanter.com/excel-programming/438789-re-marco-protect-unprotect-worksheet.html)

Mike H

Marco to protect / unprotect worksheet
 
Sub Macro1()
ActiveSheet.Unprotect password:="snow"
End Sub

Note snow is case sensitive
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"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



All times are GMT +1. The time now is 01:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com