Per, thank you very much for your assistance, the sheets are
protected, but without password, so can cover this aspect with simply
unprotecting the sheet and re applying after this macro has run, have
22 worksheets, but only need to clear data in the first 7,
as i read your code please excuse me if i am wrong but this would
unprotect every sheet?
would i need to adjust the code to just unprotect Sheet1:Sheet7
Just some clarification
Again many thanks
Steve- Hide quoted text -
- Show quoted text
have used the code below that was provided for me by pers, but am
getting an error message
Run time error '1004'
No cells were found
There are actually unlocked cells in the spreadsheets with information
in them that was expecting to be cleared
any help with this please
am using office 2003
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("w96").Value <> 0 Then
Dim sh As Worksheet
Dim cell As Range
For Each sh In ThisWorkbook.Sheets
If sh.Name <> "wages sheet" Then
sh.Unprotect
For Each cell In sh.Cells.SpecialCells(xlCellTypeConstants)
If cell.Locked = False Then
cell.Clear
End If
Next
sh.Protect
End If
Next
End If
End Sub
Steve