Locking specific cells

E

Eddy Stan

HI
i posted a query already - please ignore that.

In a data entry sheet
column b has dates and B3 has specific date
i like to lock adjacent cells in columns F,G & H
if the date in column B is not date in B3 (criteria)
further should not allow to delete anyrow when there is value in cells of
F,G & H columns. if there is no value then those can be deleted.

sub Worksheet_Change(ByVal Target As Range)

if cell(b column) = $B$3 then
activesheet.unprotect ="hi"
cell.("F"&row).locked = false
cell.("G"&row).locked = false
cell.("h"&row).locked = false

else
activesheet.unprotect ="hi"
cell.("F"&row).locked = true
cell.("G"&row).locked = true
cell.("h"&row).locked = true
endif

activesheet.protect ="hi"

end sub
 
R

Ryan H

Did I fix this issue for you in your other post titled "CAN WE LOCK CELLS AT
F COLUMN BASED ON VALUE AT C COLUMN" or is this a new issue?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top