Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to unprotect a sheet using a macro then manipulate data in the sheet and then repassword protect in the same macro
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Try something like Worksheets("Sheet1").Unprotect password:="whatever" ' your code here Worksheets("Sheet1").Protect password:="whatever" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "paul d" wrote in message ... Is it possible to unprotect a sheet using a macro then manipulate data in the sheet and then repassword protect in the same macro |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul
Yes it is. Assuming the sheet has been previously protected with a password Sub Test() ActiveSheet.Unprotect Password:="password" 'do your manipulation steps here ActiveSheet.Protect Password:="password", DrawingObjects:=True, _ Contents:=True, Scenarios:=True End Sub Gord Dibben Excel MVP On Wed, 11 Feb 2004 16:31:05 -0800, paul d wrote: Is it possible to unprotect a sheet using a macro then manipulate data in the sheet and then repassword protect in the same macro |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You're a lifesaver works perfectl ----- Chip Pearson wrote: ---- Paul Try something lik Worksheets("Sheet1").Unprotect password:="whatever ' your code her Worksheets("Sheet1").Protect password:="whatever -- Cordially Chip Pearso Microsoft MVP - Exce Pearson Software Consulting, LL www.cpearson.co "paul d" wrote in messag .. Is it possible to unprotect a sheet using a macro the manipulate data in the sheet and then repassword protect in th same macr |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thank you so much works perfectly
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to unlock and lock cells in password protected sheet | Excel Discussion (Misc queries) | |||
how do i unproctect a work sheet, forgotten password | Excel Discussion (Misc queries) | |||
how to unproctect the sheet if password is not remember? | Excel Worksheet Functions | |||
How to see macro code of a password protected macro without a password? | Excel Worksheet Functions | |||
VBa, Password protected sheet fails to get unprotected with the same password | Excel Programming |