+ Reply to Thread
Results 1 to 5 of 5

Hide rows in a protected sheet.

  1. #1
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Hide rows in a protected sheet.

    Hi Guys,

    I have seen various ways to hide and un-hide rows in a protected sheet. So far none seem to be working for me. This is the line of code I am trying to get to work in a protected sheet.

    Please Login or Register  to view this content.
    So far I have attempted 3 different was to deactivate the password at the beginning of the code and then reactivate it at the end of the code. None have worked!!! Therefore I am starting to think there might be something else afoot. If anyone could help I would appreciate it. I have attached the document also and it is run in a userform named ClintInvShpInputForm.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Hide rows in a protected sheet.

    Works for me:

    Please Login or Register  to view this content.

    WHere and how are you setting FlexSerSubvBx.Value? have you stepped through the code to see what value FlexSerSubvBx.Value has?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Hide rows in a protected sheet.

    When I open your workbook 39 and 40 are already hidden. Not sure what is supposed to make them visible again.
    Question - Why have 2 If statements for this part, why not use If/Then like so....
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Re: Hide rows in a protected sheet.

    Hi gm4evr1, I forgot I'd set them to be hidden on opening. And yes your code is how I should of done it! Still learning. There is quite a bit of that in this workbook as I'm putting it together in a fractured way.. Thanks for the coaching.

  5. #5
    Registered User
    Join Date
    03-07-2017
    Location
    Stockport, England
    MS-Off Ver
    2007
    Posts
    91

    Re: Hide rows in a protected sheet.

    Hi TMS, Thanks for this. The value is taken from column Q on 'Sheet1'. With FALSE/TRUE statements. I hadn't entered a value on this sheet by accident. Have done it now.
    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. Enabling hide/unhide rows in protected sheet
    By gm2612 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2014, 05:16 AM
  2. complicated hide/unhide rows on protected sheet
    By achohan in forum Excel General
    Replies: 15
    Last Post: 06-21-2012, 02:27 PM
  3. [SOLVED] VBA Hide/Unhide Rows when Sheet protected
    By Kinez101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2012, 01:34 PM
  4. Replies: 1
    Last Post: 08-19-2011, 10:25 AM
  5. Hide rows on a protected sheet with macro
    By darthshani in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-12-2009, 03:40 AM
  6. Macro to hide rows-sheet is being protected
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-07-2005, 03:15 PM
  7. [SOLVED] how to hide rows in a protected sheet
    By Prakash in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-18-2005, 11:06 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