Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 533
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
".Protect userinterfaceonly:=True" & ".EnableSelection = xlUnlockedCells" not tabing STEVE BELL Excel Programming 1 February 23rd 06 01:39 AM
vlookup, true false issue pjjclark[_2_] Excel Programming 8 February 6th 06 08:02 PM
question about worksheet protection using userinterfaceonly:=true David Brisco Excel Programming 0 February 9th 04 09:25 PM
ActiveSheet.Protect UserinterfaceOnly:=true Tim[_14_] Excel Programming 4 August 7th 03 09:06 PM
Problem with using Protect when userinterfaceonly:=True Les[_4_] Excel Programming 2 July 18th 03 01:50 PM


All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"