Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
lock cells after save
I want a marco to run before the workbook save:
The macro must check in every sheet the cells I1 to I50 and if there is a value inside the checked cell , it must lock the row . Example if it finds a word at cell I38 i want the macro to lock Row(38). Please help me |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
lock cells after save
Here is the code:- Sub LockEmpty() For Each s In ThisWorkbook.Sheets For Each c In s.Range("I1:I50") If Not IsEmpty(c) Then c.EntireRow.Locked = True End If Next c Next s End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Losing hyperlinks, lock Save As so it cannot be saved in a lower format | Excel Discussion (Misc queries) | |||
lock used cells | Excel Discussion (Misc queries) | |||
can I lock a spreadsheet so if any changes are made must be save with new name? | New Users to Excel | |||
why do some cells not lock? | Excel Discussion (Misc queries) | |||
how do i lock a cell? to save formula or function in it? | Excel Discussion (Misc queries) |