+ Reply to Thread
Results 1 to 3 of 3

Protect excel sheet and still copy text or object w/o unprotectin.

Hybrid View

  1. #1
    Saint
    Guest

    Protect excel sheet and still copy text or object w/o unprotectin.

    I need to be able to protect an excel sheet and still be able to copy the
    text or an imbed object without unprotecting the sheet so that the original
    text and the imbeds are never disturbed, but the text or imbeds can be copied
    to other locations on the sheet and placed.

  2. #2
    Registered User
    Join Date
    05-10-2006
    Posts
    53
    Hi

    I do not see how you can copy an object without first unprotecting the sheet. the trick to do this is then to do it programmatically, assuming your data is in A1, by unprotecting then protecting it after you are done.


    Sub Copy()
    ActiveSheet.Unprotect
    Selection.Copy
    Range("B1").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    End Sub

  3. #3
    bruceceng@gmail.com
    Guest

    Re: Protect excel sheet and still copy text or object w/o unprotectin.

    Try using another method beside selecting and copying. For example look
    at: http://www.cpearson.com/excel/clipboar.htm you could probably do
    something like this:

    Dim MyDataObj As New DataObject
    MyDataObj.SetText Format(Range("B1").Value)
    MyDataObj.PutInClipboard


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1