Hi ,
I have this VBA code that works fine but I was wondering if there was a way of shortening it so it looks better?
Also in the near future I will be need this code to also work on Lines N, L and K. So if it's possible to add these lines in to a new code, then that would be great.
Any help would be appreciated.
Thanks
Dan
I have this VBA code that works fine but I was wondering if there was a way of shortening it so it looks better?
VBA Code:
'FOR LINE J SLIPSHEET HOLDER
Application.EnableEvents = False
If Target.Column = 5 And Range("E" & Selection.Row) = "J" Or Range("E" & Selection.Row) = "j" And Range("F" & Selection.Row) = 3 _
Or Target.Column = 5 And Range("E" & Selection.Row) = "J" Or Range("E" & Selection.Row) = "j" And Range("F" & Selection.Row) = 12 _
Or Target.Column = 5 And Range("E" & Selection.Row) = "J" Or Range("E" & Selection.Row) = "j" And Range("F" & Selection.Row) = 16 _
Or Target.Column = 5 And Range("E" & Selection.Row) = "J" Or Range("E" & Selection.Row) = "j" And Range("F" & Selection.Row) = 19 Then
MsgBox "Please make sure the slip sheet holder is locked in the correct position."
Application.EnableEvents = True
End If
Also in the near future I will be need this code to also work on Lines N, L and K. So if it's possible to add these lines in to a new code, then that would be great.
Any help would be appreciated.
Thanks
Dan