dependency protected cells

M

Mario

HI!
i have a problem in reference to protecting cells:

my 2 cells A1 and A2
i want that A2 is as long protected as A1 is empty, so that the user has to
fill in A1 first and finally then he can fill out A2.
so i want A2 to be write protected as long as A1 is empty

maybe some of u has a solution that could help me

regards
mario
 
S

steve

Mario,

You can set A1 to unlocked than protect the worksheet with a password.

In the worksheet module have a change event

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "A1" then
ActiveSheet.Unprotect "mypassword"
End If
End Sub
 

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