![]() |
Issue with UnProtect userinterfaceonly:=true
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 |
Issue with UnProtect userinterfaceonly:=true
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 |
Issue with UnProtect userinterfaceonly:=true
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 |
All times are GMT +1. The time now is 01:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com