+ Reply to Thread
Results 1 to 6 of 6

Hide and unhide columns with password

  1. #1
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    286

    Hide and unhide columns with password

    I need to hide two column and also to unhide them, with a password.
    Is it possible to hide/unhide columns (and rows) with a password ?
    Could anybody help me with the macro ?
    Please see the attached workbook...
    Saturn
    Attached Files Attached Files

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

    Re: Hide and unhide columns with password

    Try the attached file. The current password is 'mypassword'. Change the password in the macros to suit your needs.
    Attached Files Attached Files
    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 Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    286

    Re: Hide and unhide columns with password

    It works excellent with the original passoword, but it seems to some problemes when chagnge the passord in the VBA code to something else.
    I will test it further tomorrow because this macro is really interessting, and a big need for. Thank you so far Mumpsi1. I will revert tomorrow morning around lunch. CET-time. Thans a lot so far!!

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

    Re: Hide and unhide columns with password

    Before you change the password in the code, you have to unprotect the sheet with "mypassword" and then protect it again with your new password. Then change the password in the code and try it again. Please let me know how it works out.

  5. #5
    Forum Contributor
    Join Date
    10-31-2006
    Location
    Oslo, Norway
    MS-Off Ver
    MS 365 Business
    Posts
    286

    Re: Hide and unhide columns with password

    I get the error message 'Run-time error '1004'. I try to do it how you describe: unprotect with 'mypassword'. And then try to protect it with new passord, (..error msg..) and then change to the new password in the code, but then I get the Run-time error 1004-message. The new password I try to enter is 'Carl'. Could you be so kind to look into it this again, Mumps1 ?
    Saturn

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

    Re: Hide and unhide columns with password

    Try the attached file.
    Attached Files Attached Files

+ 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. Unhide/ hide rows with password
    By megtoma in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-29-2023, 12:07 AM
  2. Hide Selected Sheets And No Unhide Without Entering Password
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-19-2014, 11:53 PM
  3. [SOLVED] use of password for tab hide/unhide using vba
    By innerise in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2013, 03:36 PM
  4. Replies: 2
    Last Post: 01-17-2013, 08:39 AM
  5. VBA to Unprotect (w/ password), Unhide, Hide, and Protect (w/ password)
    By pger34 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-14-2012, 12:35 PM
  6. hide / unhide separate sheets based on password
    By spudinsane in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-27-2011, 04:48 AM
  7. Command button to Hide a tab and unhide a tab with a password
    By nik63 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2011, 07:24 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