+ Reply to Thread
Results 1 to 2 of 2

Protected sheet running macro on incorrect password input

  1. #1
    Registered User
    Join Date
    09-28-2018
    Location
    Scarborough
    MS-Off Ver
    2016
    Posts
    1

    Post Protected sheet running macro on incorrect password input

    Good afternoon,

    I have set up a toggle button that allows the user to click a button that switches the active worksheet between being protected and unprotected. In addition, when unprotecting the sheet, I want it to also unhide certain columns on the active worksheet.

    Everything seems to be working as intended, except a certain section of my code is running regardless of whether you input the correct password to unlock the sheet (or if you click cancel). The issue seems to be somewhere within the red text (see below). Any suggestions on making it so that the subsequent code (
    Please Login or Register  to view this content.
    Thanks
    Last edited by FDibbins; 09-29-2018 at 02:03 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Protected sheet running macro on incorrect password input

    Hi, welcome to the forum

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    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, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Need Macro + Password Protected Sheet
    By Casper99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2016, 03:58 PM
  2. How to run a macro in password protected sheet
    By leo73pk in forum Excel General
    Replies: 15
    Last Post: 06-14-2013, 05:33 AM
  3. Running Macro in Password protected sheet in excel 2007
    By alla_ratnaji in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-28-2012, 03:30 AM
  4. Excel 2007 : Running a Macro on a Password Protected Sheet
    By Martin Chamberlin in forum Excel General
    Replies: 1
    Last Post: 05-05-2011, 09:27 AM
  5. Unlocking protected cells, prevent incorrect password error
    By iisjman07 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2010, 10:51 AM
  6. Error Handler for Incorrect Password (Protected Sheet)
    By jasoncw in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-01-2007, 06:44 PM
  7. check password to prevent incorrect input
    By tsec in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2005, 11:33 AM

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