Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2008

Tip: Looking for answers? Try searching our database.

Issue with UnProtect userinterfaceonly:=true

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
robs3131 - 17 Apr 2008 13:14 GMT
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

Signature

Robert

Jim Rech - 17 Apr 2008 13:20 GMT
userinterfaceonly is a parameter of the Protect method, not Unprotect.

Signature

Jim

| Hi all,
|
[quoted text clipped - 11 lines]
| Code:
| Sheets("Transaction Summary").Unprotect userinterfaceonly:=True
robs3131 - 23 Apr 2008 14:18 GMT
I see that now - thanks!
Signature

Robert

> userinterfaceonly is a parameter of the Protect method, not Unprotect.
>
[quoted text clipped - 15 lines]
> | Code:
> | Sheets("Transaction Summary").Unprotect userinterfaceonly:=True
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.