+ Reply to Thread
Results 1 to 16 of 16

Issue with Protect/Unprotect Macro

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Issue with Protect/Unprotect Macro

    Caps lock wont matter in code, unless the password is in caps, but it looks the same.

    What is erroring the unprotect?
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  2. #2
    Registered User
    Join Date
    08-02-2013
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Issue with Protect/Unprotect Macro

    Sub Unprotect()

    'stops screen updating

    Application.ScreenUpdating = False



    'unprotects locked cells

    For Each sht In ActiveWorkbook.Sheets
    sht.Unprotect Password:="teslinoor"
    Next
    ActiveWorkbook.Unprotect Password:="teslinoor"

    End Sub

    "sht.Unprotect Password:="teslinoor" is the error. I have even tried manually unprotecting the file by typing in nthe password from the protect macro, but that has failed as well. Now my file is locked and I unable to unlock it for further editions.

    -JT

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to Unprotect and Protect
    By MBeedle in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-22-2013, 01:32 AM
  2. [SOLVED] Protect / Unprotect Macro
    By jason.hampton in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-06-2012, 03:36 AM
  3. Protect & unprotect worksheet Macros - supplementary issue
    By David_S_Walker in forum Excel General
    Replies: 2
    Last Post: 03-31-2010, 07:35 AM
  4. Macro to Protect and UnProtect
    By mmacw in forum Excel General
    Replies: 2
    Last Post: 02-13-2007, 04:39 PM
  5. [SOLVED] unprotect and protect within a macro
    By Staalkop in forum Excel General
    Replies: 4
    Last Post: 10-27-2005, 04:05 PM

Tags for this Thread

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