Sounds like you are putting the code in the wrong sheet. Right click the sheet tab you want this to work on, and view code. Put it in that one. It will target the hidden sheeet and modify the data even though you are on a different sheet.

Sheets("TargetSheet").protect Password:="password"


---------- Post added at 11:16 AM ---------- Previous post was at 11:05 AM ----------

If the above does not solve it try

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim tmpbox As Range
application.screenupdating = false
Set tmpbox = worksheet("TargetSheet").Range("A8")
worksheet("TargetSheet").Unprotect

Do Until tmpbox.Row = 26
If tmpbox.Value = "" Then
tmpbox.Offset(0, 2).Value = ""
End If
Set tmpbox = tmpbox.Offset(1, 0)
Loop
worksheet("TargetSheet").Protect password:="password"

End Sub