disabling cells

L

lak

Hi

I would like to know if there is any code in VBA by which i can disabl
cells in Excel once the work sheet is open.


Thank
 
L

losmac

Private Sub Workbook_Open(
ThisWorkbook.WorkSheets("name").Range("2:2").Hidden = Tru
End Sub
 
F

Frank Kabel

Hi
what do you mean with 'disable'?. You may unlock all other cells
('Format - Cells - Protection') and protect the worksheet to prevent
any entries in the remaining (locked) cells
 
L

lak

Hi
thanx for the reply..however i dont understand how to unlock a cel
when the work sheet is protected b'cause the menu which
said(Format-Cell-unlock) is not enabled once the work sheet i
protected...Can u pls give me a step by step explanation.

Than
 
L

lak

Hi x

Thanx for ur reply....in the codewhat does (2:2) stand for is it th
Row & column? can u pls tell me in detail.

Than
 
F

Frank Kabel

Hi
within your code do the following:
- unprotect the worksheet
- unlock the cell
- protect the worksheet again

Try recording a macro while doing this manually
 
Top