Hide rows and prevent unhiding

  • Thread starter Thread starter david.j.winfield
  • Start date Start date
D

david.j.winfield

I was wondering if there is a way to hide rows so that they can only
be unhidden using VBA using something like veryhidden or something
like that?

I am using the top row of my sheet to create custom views by hiding/
unhiding columns. I wold like to either hide this top row or somehow
make it read only without protecting the sheet.

This data is not confidential so I do not mind others being able to
read it but I don't want them to be able to change them and mess up my
layout.

It seems that if I set hidden equal to true in VBA it hides the row
and unhiding by selecting the row and clicking unhide does not unhide
the row. However, resizing the rows can bring the row back.

Is there someway to detect if a resize occurs?

Thanks,
David
 
The only solution that I can think of without using protection would be to
hide the Column and Row headings for that sheet (Tools -> Options -> View ->
Uncheck "Row and Column Headers"). A little drastic but it would work.
 
Add a 2nd worksheet ("Views") right after the worksheet with the data
("Data"). Put the view settings on the "View" worksheet, then hide it
(and protect it, if you think you need to). The only problem might be if
the user tries to delete rows or columns on the "Data" worksheet (maybe
have a change event macro to catch this?).
 
Back
Top