Hi,
Why does the error 1004 occure here?
(error marked between >> <<)
and what do I do to avoid it in the future?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Unprotect Password:="peterke"
Application.ScreenUpdating = False
Range("C6").Select
>>ActiveCell.FormulaR1C1 = "=SUM(R[1]C,1)"<<
Range("C6").Select
ActiveSheet.Protect Password:="peterke"
Application.ScreenUpdating = True
End Sub
greets,
Peterke
Bookmarks