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.
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
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.
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.
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.
Please find the sample attached to this post.
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.
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).
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks