LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default protection puzzle

Well, I'll be damned! Who would have guessed it would work the way you show,
but not the more direct route with the copy source and destination in the
same statement? But, work it does. I had already gone and written a loop
through each of the cells in the copy range to get the values and needed
formats to the destination. (GRRRR!!!) But I'll go back and replace with
this.

That's got to be one of the more ridiculous things I've seen Excel do.
Thanks so much for clearing up that little mystery!

Lynn

"Peter T" wrote:

There are some quirks with UserInterfaceOnly=True, try it like this

Worksheets(1).Protect UserInterfaceOnly:=True
Range("Rng_A").copy
Range("Rng_B").PasteSpecial xlPasteAll

Don't forget you'll always need to run Protect UserInterfaceOnly:=true after
a wb has been saved and reopened, typically in the open event

Regards,
Peter T


"B Lynn B" wrote in message
...
I posted this yesterday and got a reply that didn't solve anything, so
thought I'd try restating to see if a more revealing answer is available.

For testing, and to simplify the problem, I made a brand new file with no
other code. Rng_A is on an unprotected sheet, and Rng_B on the protected
one. The protection dialog box is checked for allowing user to select
locked
cells. Of the examples below, the first works, while the second fails.
It
seems to violate the intent of the UserInterfaceOnly setting. Anybody
know
what's at the bottom of this?

Example 1:
Sheets(1).unprotect
Range("Rng_A").copy Range("Rng_B")

Example 2:
Sheets(1).protect UserInterfaceOnly:=True
Range("Rng_A").copy Range("Rng_B")






 
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
Excel Puzzle Templar Excel Discussion (Misc queries) 5 March 2nd 08 04:49 AM
Pivot Puzzle Wanna Learn Excel Discussion (Misc queries) 3 November 1st 07 12:11 AM
Excel Puzzle dwalesb Excel Worksheet Functions 2 January 26th 06 06:27 PM
Can you help!!!!! New Puzzle Krefty Excel Discussion (Misc queries) 0 June 13th 05 08:13 PM
Randbetween puzzle??!? getexel Excel Programming 1 April 29th 04 06:30 PM


All times are GMT +1. The time now is 04:26 PM.

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"