ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to hide and lock all cells but A1? (https://www.excelbanter.com/excel-programming/427059-how-hide-lock-all-cells-but-a1.html)

Pat

How to hide and lock all cells but A1?
 
I can write a macro that gets the last cell and figures out the ranges of
rows and columns that do not play but is there an easier way to do this?
Pat

Jacob Skaria

How to hide and lock all cells but A1?
 
Are you looking for

Cells(1, 1).Locked = False
Rows("2:" & Rows.Count).Hidden = True
Range(Columns(2), Columns(Columns.Count)).EntireColumn.Hidden = True
ActiveSheet.Protect

If this post helps click Yes
---------------
Jacob Skaria


"Pat" wrote:

I can write a macro that gets the last cell and figures out the ranges of
rows and columns that do not play but is there an easier way to do this?
Pat



All times are GMT +1. The time now is 04:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com