Hide/lock cells?
so I can do something like this:
---------
Cells(x,y).select
selection.FormulaHidden = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
-------------
Is this the code to lock cells:
cells(x,y).Locked = True
--------------
Another related question. For the code below
Columns("AT:IV").Hidden = True '??How can I use numbers for columns instead
of AT and IV? do I need to use cells.
Rows("44:65536").Hidden = True ' I used a variable row= 1, col = 44 and when
I tried:
Rows("row:col"), this would not work. Do you have any input on this
Thanks for your help
"Tom Ogilvy" wrote:
Yes, guess I focused on the "Hide" portion and ignored the "Lock" portion.
--
Regards,
Tom Ogilvy
"Bob Phillips" wrote:
Individual cells can be locked though.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Tom Ogilvy" wrote in message
...
Not in the same sense as a row or a column. You can hide the formula in a
cell by using
Selection.FormulaHidden = True
but the value it calculates will be displayed. You set this property of
the
range as shown, then you must protect the sheet.
Otherwise, hide the entirerow or column.
--
Regards,
Tom Ogilvy
"David" wrote:
Hello,
I know that range of rows or columns can be hidden or locked.
How about specific cells? what is the syntax for that.
Thanks for your help
|