Hi,
Is it possible to protect just certain cells on an Excel spreadsheet?
I need to prevent the user from accidentally entering data into certain columns unless they have entered a password.
I'm OK with the password entry bit.
The code I have so far is:
The test code above is supposed to just prevent data entry to column A.VB Code:
Private Sub cmdLockA_Click() Sheet1.Range("A:A").Locked = True Sheet1.Protect End Sub Private Sub cmdUnlockA_Click() frmPasswordColumnA.Show If sColumAPasswordEntered = "Sossij" Then Sheet1.Unprotect Sheet1.Range("A:A").Locked = False End If End Sub
Unfortunately, it seems to protect the whole sheet.
Any help would be appreciated.




Reply With Quote