+ Reply to Thread
Results 1 to 2 of 2

Password Protect macro - password saved on some sheets (part working) parts not working

  1. #1
    Registered User
    Join Date
    05-27-2014
    Posts
    2

    Password Protect macro - password saved on some sheets (part working) parts not working

    I am a newbie at this, and I am working on a macro to protect sheets with different options of editing. Thanks for your help.
    The following code is working:
    Set wsArray = Sheets(Array("Instructions", "Questionnaire", "Financial Stmt Data Entry", "Use Agreement Tracking", "1st Qtr.", "2nd Qtr.", "3rd Qtr.", "4th Qtr.", "2014 Annual Review", "QrtlyGraphs", "AnnualGraphs", "Shareholders Equity Recon"))
    For Each ws In wsArray
    ws.Protect Password:="igbtest", DrawingObjects:=True, Contents:=True, Scenarios:=True

    This part is not working: (I can unprotect the sheets without it asking me for a password.)
    Next
    Set wsArray = Sheets(Array("Debt Schedule", "Accts Receivable", "Accts Payable", "Selected Disclosures"))
    For Each ws In wsArray
    ws.Protect Password:=”igbtest”, DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowInsertingRows:=True
    Next
    Sheets("Chart of Accounts").Select
    ActiveSheet.Protect Password:=”igbtest”, DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFiltering:=True
    Sheets("Business Activity").Select
    ActiveSheet.Protect Password:=”igbtest”, DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFormattingRows:=True
    End Sub

  2. #2
    Registered User
    Join Date
    05-27-2014
    Posts
    2

    Re: Password Protect macro - password saved on some sheets (part working) parts not workin

    Someone in another forum caught on to my 'weird' " " marks around the passwords in the second part. Probably part of code I had copied in the from the internet as an example to follow. All fixed!

+ 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. Password protect not working
    By paul_carron in forum Excel General
    Replies: 3
    Last Post: 10-30-2013, 12:57 PM
  2. VBA to ask for password before allowing to choose name for password not working
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2013, 03:33 AM
  3. Trying to build Macro to password protect all sheets in workbook
    By eatmorecheese in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2012, 12:07 PM
  4. Password protect not working
    By praveen_khm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2006, 08:00 AM
  5. Password Protect When Saved
    By Nick in forum Excel General
    Replies: 2
    Last Post: 07-06-2005, 03:05 PM

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