ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Temporarily override sheet protection (https://www.excelbanter.com/excel-programming/318024-temporarily-override-sheet-protection.html)

Elijah

Temporarily override sheet protection
 
Hi, Does anyone know of an easy way to temporarily override the sheet
protection?

After copying a range - I want to paste into a protected sheet.

Rows("2:2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Elijah



Dean Hinson[_3_]

Temporarily override sheet protection
 
Elijah,

If it is password protected like a few that I work with, I use the following
code to un protect...

ThisWorkbook.Worksheets(p_Sheet).Unprotect ("password")

And then when I am done....

ThisWorkbook.Worksheets(p_Sheet).Protect ("password")

HTH, Dean.

"Elijah" wrote:

Hi, Does anyone know of an easy way to temporarily override the sheet
protection?

After copying a range - I want to paste into a protected sheet.

Rows("2:2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Elijah





All times are GMT +1. The time now is 05:20 PM.

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