
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range, row1 As Long, col1 As Long
Application.Run "SProteggi_Fogli"
If Intersect(Target, Range("X10")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Set c = Range("Nomi").Find(Range("X9"))
If c Is Nothing Then
MsgBox "Nominativo non trovato."
Exit Sub
End If
row1 = c.Row
Set c = Range("Magazzini").Find(Range("X8"))
If c Is Nothing Then
MsgBox "Magazzino non trovato."
Exit Sub
End If
col1 = c.Column
Cells(row1, col1) = Range("X10")
Application.EnableEvents = True
Application.Run "Proteggi_Fogli"
End Sub |
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range, row1 As Long, col1 As Long
Application.Run "SProteggi_Fogli"
If Intersect(Target, Range("X10")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Set c = Range("Nomi").Find(Range("X9"))
If c Is Nothing Then
MsgBox "Nominativo non trovato."
Exit Sub
End If
row1 = c.Row
Set c = Range("Magazzini").Find(Range("X8"))
If c Is Nothing Then
MsgBox "Magazzino non trovato."
Exit Sub
End If
col1 = c.Column
Cells(row1, col1) = Cells(row1, col1) + Range("X10")
Application.EnableEvents = True
Application.Run "Proteggi_Fogli"
End Sub |
