-1

I have a sheet that has column B. the states a disposition of our product released, hold ect.. column A. states what has been done with this product ie shipped, in storage ect. I need to have column A. to be locked if column B. is set to "Hold" I am pretty new to this coding and so I have almost no idea where to start or if its even possible.

JvdV
  • 70,606
  • 8
  • 39
  • 70

1 Answers1

0

Pasted in VBE under sheet that you want this rule to apply to...

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Range("A:A")) Is Nothing Then
    If Target.Count = 1 Then
        If Target.Offset(, 1) = "Hold" Then
            Application.EnableEvents = False
                Application.Undo
                MsgBox "Cell on Hold. Reverting changes", vbCritical
            Application.EnableEvents = True
        End If
    End If
End If

End Sub
urdearboy
  • 14,439
  • 5
  • 28
  • 58