Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo fine
Nc = Target.Column: Nr = Target.Row
If Nr <= Range("esito").Row Then Exit Sub
If Nc = Range("esito").Column Then
If Target.Value <> 0 And Target.Offset(0, 1) = 0 Then
Target.Offset(0, 1) = Now()
Target.Offset(1, 0).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="positivo, negativo, sospeso"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End If
End If
fine:
End Sub |