View Single Post
 
Old 06-11-2020, 06:14 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 871
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Not sure what you want but try replacing with:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cll As Range
Set cellsToProcess = Intersect(Target, Range("B2:J4"))
 If Not cellsToProcess Is Nothing Then
  For Each cll In cellsToProcess.Cells
    With cll.Validation
      If HasValidation(cll) Then
        If .Type = xlValidateInputOnly Then
          If Len(cll.Value) > 0 Then
          cll.Select
            .InputMessage = InputBox("Confirm/Edit customer ID for selected cell", , .InputMessage)
            .ShowInput = True
            If .InputMessage = "" Then .Delete
          Else
            .ShowInput = False
          End If
        End If
      Else
        If Len(cll.Value) > 0 Then
          .Add Type:=xlValidateInputOnly
          cll.Select
          .InputMessage = InputBox("Enter customer ID for selected cell")
          If .InputMessage = "" Then .Delete
        End If
      End If
    End With
  Next cll
End If
End Sub

Last edited by p45cal; 06-11-2020 at 02:26 PM.
Reply With Quote