+ Reply to Thread
Results 1 to 1 of 1

Copy Sheet Protection to a new sheet in excel

  1. #1
    Registered User
    Join Date
    06-01-2011
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    7

    Wink Copy Sheet Protection to a new sheet in excel

    I have a workbook which will have sheets added everyday. The sheet template is protected so that only certain cells are editable. How can I copy the information on the sheet and paste on a new sheet but keep the new sheet protected? I would like the protection to happen automatically as other users will be copy and pasting in to new sheets but they won't know how to protect the sheet.

    Thank you.

    Is there a Module / Macro I can install that will automatically protect all worksheets upon save?
    ------------------------------------------

    I found this answer in another post.. It works and answered my question.


    The following macro cycless through all the worksheets in the active
    workbook, protecting them and assigning the password of "Password"

    Sub ProtectAll()

    Dim wb As Workbook
    Dim ws As Worksheet

    Set wb = ActiveWorkbook

    For Each ws In wb.Worksheets
    ws.Protect DrawingObjects:=True, _
    Contents:=True, Scenarios:=True, _
    Password:="Password"
    Next ws

    Set wb = Nothing
    Set ws = Nothing

    End Sub

    Place it in a VBA module by pressing Alt+F11, click INSERT on the menu and
    select MODULE. You can either type the code above or cut and paste it. To
    run the macro select TOOLS on the menu, click MACRO and then select MACROS.
    The macro will be in the list of available macros. You can select it and
    then click the RUN command button.
    --
    Kevin Backmann
    Last edited by Lisea123; 07-15-2011 at 02:26 PM. Reason: Question Answered in post by another user.

+ 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