Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have a file that has 65 sheets -- I would like to protect them all, but not have to unprotect and then protect again each time I have code run to change a given sheet. I was under the impression that "UnProtect userinterfaceonly:=true" allows code to change a sheet without needing to reprotect it. When I tried using this on a sheet that was protected (my line of code is below), I get the good old Run-time error '1004 error. Any idea on why this is not working? Thanks for your help! Error: Run-time error '1004': Application-defined or object defined error Code: Sheets("Transaction Summary").Unprotect userinterfaceonly:=True -- Robert |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
userinterfaceonly is a parameter of the Protect method, not Unprotect.
-- Jim "robs3131" wrote in message ... | Hi all, | | I have a file that has 65 sheets -- I would like to protect them all, but | not have to unprotect and then protect again each time I have code run to | change a given sheet. I was under the impression that "UnProtect | userinterfaceonly:=true" allows code to change a sheet without needing to | reprotect it. When I tried using this on a sheet that was protected (my line | of code is below), I get the good old Run-time error '1004 error. Any idea | on why this is not working? Thanks for your help! | | Error: | Run-time error '1004': Application-defined or object defined error | | Code: | Sheets("Transaction Summary").Unprotect userinterfaceonly:=True | | -- | Robert |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I see that now - thanks!
-- Robert "Jim Rech" wrote: userinterfaceonly is a parameter of the Protect method, not Unprotect. -- Jim "robs3131" wrote in message ... | Hi all, | | I have a file that has 65 sheets -- I would like to protect them all, but | not have to unprotect and then protect again each time I have code run to | change a given sheet. I was under the impression that "UnProtect | userinterfaceonly:=true" allows code to change a sheet without needing to | reprotect it. When I tried using this on a sheet that was protected (my line | of code is below), I get the good old Run-time error '1004 error. Any idea | on why this is not working? Thanks for your help! | | Error: | Run-time error '1004': Application-defined or object defined error | | Code: | Sheets("Transaction Summary").Unprotect userinterfaceonly:=True | | -- | Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
".Protect userinterfaceonly:=True" & ".EnableSelection = xlUnlockedCells" not tabing | Excel Programming | |||
vlookup, true false issue | Excel Programming | |||
question about worksheet protection using userinterfaceonly:=true | Excel Programming | |||
ActiveSheet.Protect UserinterfaceOnly:=true | Excel Programming | |||
Problem with using Protect when userinterfaceonly:=True | Excel Programming |