+ Reply to Thread
Results 1 to 8 of 8

Allow resize Columns/Rows and disable hide/unhide

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    702

    Allow resize Columns/Rows and disable hide/unhide

    Hi,

    This issue a bit difficult as if we tick on Format columns/rows to allow resize function, Excel will include Hide/Unhide function.

    Is there any method to resolve the issue? Preferably not using the macro.
    1. Thank those who have helped you by clicking the Star * below the post.
    2. Please mark your post [SOLVED] if it has been answered satisfactorily.

    Sincerely,
    Farid

  2. #2
    Forum Contributor
    Join Date
    02-26-2014
    Location
    Aylsham, Norfolk, UK
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Allow resize Columns/Rows and disable hide/unhide

    Protecting the Sheet, does just that.

    To disable the Hide/Unhide you need to click on Protect Workbook. This has different privileges associated with it. You only need to enter the password for that one.

    I would recommend setting all your sheet protection options first for all the sheets you want to protect, then apply the Workbook protection.

    I think that is what you are asking for.

  3. #3
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    702

    Re: Allow resize Columns/Rows and disable hide/unhide

    HI llamafarmer,


    Totally misunderstood. Please show me the sample if you can do


    E.g. I want to protect entire rows 4 & 5 but have to allow resize columns and disable hide/unhide function.

  4. #4
    Forum Contributor
    Join Date
    02-26-2014
    Location
    Aylsham, Norfolk, UK
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Allow resize Columns/Rows and disable hide/unhide

    I have just been looking at it a bit more, and what you are saying is that you want to be able to stop people from being able to hide/unhide rows and/or columns as apposed to sheets.

    I have just realised that what I have suggested would not help to do that. However there might be another way to do what you want to do.

    The best way to I can think to do this is with formatting of the cells you want to protect. I've attached some screen grabs to make it a bit easier to follow.

    Select the columns/rows/cells you want to hide (conceal).
    Attachment 439868

    Format it with the same colour text as the fill
    Attachment 439869

    Next right click the colums/rows/cells you want to protect and right click, the select Format Cells.
    Attachment 439870

    Now make sure that you have the Locked box ticked (if you want to hide formulas the is where to do it with the hidden box. (By default they will be locked, so for all other columns/rows/cells, you will need to untick the locked box.
    Attachment 439872

    Right click again and now select hide.
    Attachment 439873

    Finally, click on the Review tab of the ribbon, click Protect Sheet, set your password and untick select Locked cells, and tick format columns/rows/cells as required.

    I'll attach a sample on the next post.

  5. #5
    Forum Contributor
    Join Date
    02-26-2014
    Location
    Aylsham, Norfolk, UK
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Allow resize Columns/Rows and disable hide/unhide

    Please find the sample attached to this post.

  6. #6
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    702

    Re: Allow resize Columns/Rows and disable hide/unhide

    Hi llamafarmer,

    Thanks for the willingness to help me but you were totally misunderstood especially when suggested me to select columns/rows/cells to be hidden.

    My problem is I want to protect the header rows from being deleted and need to allow resize columns and insert rows. The problem is in the protect sheet dialog box, if we tick on Format columns /rows, Excel will enable hide/Unhide function.

    so, how to disable hide/unhide function with the above requirement.

    #As far as I Know only workaround using macro may resolve it using EntireColumn.AutoFit in the worksheet change event. However, macro is not my preference due to the file will be distributed to others who not enable macro setting on their desktop.
    Last edited by Faridwahidi; 01-13-2016 at 02:02 AM.

  7. #7
    Forum Contributor
    Join Date
    02-26-2014
    Location
    Aylsham, Norfolk, UK
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Allow resize Columns/Rows and disable hide/unhide

    I think I understand.

    However putting aside the formatting part, you should still be able to protect your headers from being deleted/hidden using the Lock/unlock and applying to the header row. With that you cannot select the column/row, if you can't select it, you can't delete it.

    Once this is done the Columns can still be edited, rows/columns can still be inserted but the header row cannot removed/hidden. The only exception is if any of the rows above are not locked, then a person could select across them and hide them. Once protected the cells cannot be deleted.

    The VB you have entered is for autofit and does not effect or is even related to showing/hiding columns, so based on that I'm assuming you are referring to using the VB code whilst using protected without selecting the format columns option in the protection selection window.

    I am I any closer? (See the attached).
    Attached Files Attached Files

  8. #8
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    702

    Re: Allow resize Columns/Rows and disable hide/unhide

    Hi,

    Problem resolved. Thanks a lot.

    I feel really stupid although have been using excel & create macro for a few years I am overlooked on unchecked Select locked cells to disable user hide locked Cells.

    I have added reputation to you. Tq friend

    protect file.jpg
    Last edited by Faridwahidi; 01-13-2016 at 05:18 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. [SOLVED] VBA to hide/unhide rows & columns on multiple sheets
    By Adam23 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-14-2015, 07:06 PM
  2. Hide/unhide rows & columns
    By wedzmer in forum Excel General
    Replies: 33
    Last Post: 07-01-2015, 03:49 AM
  3. Excel Hide/Unhide Rows/Columns
    By jregan in forum Excel General
    Replies: 4
    Last Post: 08-03-2010, 11:55 AM
  4. allow resize but not hide/unhide
    By moschen in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-04-2009, 10:04 AM
  5. How to hide and unhide Rows & Columns
    By Aarif in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2006, 01:25 AM
  6. Replies: 1
    Last Post: 01-23-2006, 11:10 AM
  7. Hide / Unhide columns and rows
    By PaulM in forum Excel General
    Replies: 8
    Last Post: 12-12-2005, 11:10 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