Hi harrisonland your modified:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cella As Range
Application.EnableEvents = False
'Set cella = Range("A3") '<<< cella singola
'Set cella = Cells(Target.Row, Target.Column) '<<< colonna
Set cella = Cells(Target.Row, 1) '<<< cella singola
With cella
If .Value = "" Then
'MsgBox "Devi inserire una data nella cella A" & Target.Row & " ", vbCritical, "Errore!"
MsgBox "You must enter a date in cell A" & Target.Row & " ", vbCritical, "Errore!"
cella.Select
Application.EnableEvents = True
Exit Sub
End If
End With
Set cella = Cells(Target.Row, 2) '<<< cella singola
With cella
If .Value = "" Then
MsgBox "Devi inserire il reparto nella cella B" & Target.Row & " ", vbCritical, "Errore!"
cella.Select
Application.EnableEvents = True
Exit Sub
End If
End With
Set cella = Cells(Target.Row, 3) '<<< cella singola
With cella
If .Value = "" Then
MsgBox "Devi inserire l'operatore nella cella C" & Target.Row & " ", vbCritical, "Errore!"
cella.Select
Application.EnableEvents = True
Exit Sub
End If
End With
Set cella = Cells(Target.Row, 4) '<<< cella singola
With cella
If .Value = "" Then
MsgBox "Devi inserire il tempo nella cella D" & Target.Row & " ", vbCritical, "Errore!"
cella.Select
Application.EnableEvents = True
Exit Sub
End If
End With
Application.EnableEvents = True
End Sub
work well.
Thans you
xam
Bookmarks