+ Reply to Thread
Results 1 to 14 of 14

excel 16: unprotect excel sheet

  1. #1
    Registered User
    Join Date
    10-09-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    43

    excel 16: unprotect excel sheet

    Hi,
    In excel workbook, each time i open it.. i have to.right click and unprotect the sheet. how can i let the sheet remains unprotected?

    workbook attached

    Im getting error Run time 1004 .. The cell or chart you're trying to change is on protected sheet...
    Any idea?
    Last edited by Akika; 09-28-2019 at 06:46 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: excel 16: unprotect excel sheet

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: excel 16: unprotect excel sheet

    Or inside Workbook_Open:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Registered User
    Join Date
    10-09-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    43

    Re: excel 16: unprotect excel sheet

    can .Protect userinterfaceonly:=True cause this error 1004 ??
    i added both codes above and getting enable contents after click then getting error 1004.
    Last edited by Akika; 09-25-2019 at 03:22 PM.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: excel 16: unprotect excel sheet

    Can you attach a copy of your file with all macros you are currently using (de-sensitized if necessary)?

  6. #6
    Registered User
    Join Date
    10-09-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    43

    Re: excel 16: unprotect excel sheet

    Run time error.
    how to modify the code to skip all run time errors.
    Attached Files Attached Files

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,915

    Re: excel 16: unprotect excel sheet

    Why post a locked project?
    Rory

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: excel 16: unprotect excel sheet

    As rorya pointed out, please post an unprotected version of your file so we can see the code you are currently using. You will have to comment out the lines of code in the Workbook_Open module that protect the workbook so it remains unprotected when it is opened.

  9. #9
    Registered User
    Join Date
    10-09-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    43

    Re: excel 16: unprotect excel sheet

    Oops :S
    PFA
    no password to unprotect the sheet test.
    passwrd was added in vba code.
    Attached Files Attached Files

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: excel 16: unprotect excel sheet

    I get an error when I click the button on the "Test" sheet. This line of code is highlighted when I click "Debug":
    Please Login or Register  to view this content.
    Trty changing it to
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    10-09-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    43

    Re: excel 16: unprotect excel sheet

    in ctry sheet, cell a2 should be none.
    Get Run-Time Error 1004 The cell or chart ur're trying to change is on a protected sheet..

    Ive added .Unprotect before .displayAlerts and now getting “Run-Time Error ‘438’.
    Any idea??
    Last edited by Akika; 09-27-2019 at 03:38 AM.

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: excel 16: unprotect excel sheet

    In the file you posted, which macro sets cell A2 to "None" in the "ctry" sheet? I don't understand why you get that error message since that sheet is not protected.

  13. #13
    Registered User
    Join Date
    10-09-2018
    Location
    canada
    MS-Off Ver
    2016
    Posts
    43
    Quote Originally Posted by Mumps1 View Post
    In the file you posted, which macro sets cell A2 to "None" in the "ctry" sheet? I don't understand why you get that error message since that sheet is not protected.
    a2 in sheet ctry u can input manually to none pls.
    its the drop down lov to use for sheet" test"do u think it is bcoz of the combo box tht thrwing the issue
    Last edited by Akika; 09-28-2019 at 12:12 AM.

  14. #14
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: excel 16: unprotect excel sheet

    Administrative Note:
    This is not the first time you were warned about this behavior...

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code. see original post

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Last edited by Pepe Le Mokko; 09-28-2019 at 03:20 AM.

+ 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. unprotect excel sheet
    By annux08 in forum Excel General
    Replies: 3
    Last Post: 07-01-2015, 07:32 AM
  2. How to unprotect excel sheet
    By Ankit_Kumar in forum Excel General
    Replies: 1
    Last Post: 05-21-2015, 07:43 AM
  3. How to unprotect excel sheet
    By kisanvikas2015 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2015, 08:24 AM
  4. Help. How to unprotect excel sheet?
    By Alaa Ammar in forum Excel General
    Replies: 1
    Last Post: 07-01-2011, 02:02 AM
  5. [SOLVED] EXCEL UNPROTECT SHEET WILL NOT DISPLAY....HELP!
    By JAN in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  6. EXCEL UNPROTECT SHEET WILL NOT DISPLAY....HELP!
    By JAN in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  7. [SOLVED] EXCEL UNPROTECT SHEET WILL NOT DISPLAY....HELP!
    By JAN in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10: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