Hi all,
Currently trying to put together a bit of code that returns a message box if a cell exceeds a certain number.
Here it is:
However no message box is appearing if the cells hit 10250. What am I doing wrong?
(I am also trying to achieve line breaks in the message box).
Currently trying to put together a bit of code that returns a message box if a cell exceeds a certain number.
Here it is:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
If Range("C8").Value > 10249 Then
MsgBox ("The last batch number in this range has been reached. Please complete the following steps:" & vbCrLf & _
"- Delete the last line of information entered" & vbCrLf & _
"- Open the associated Batch Numbers spreadsheet" & vbCrLf & _
"- Manually delete the dates and job numbers currently against the batch numbers")
ElseIf Range("C9").Value > 10249 Then
MsgBox ("The last batch number in this range has been reached. Please complete the following steps:" & vbCrLf & _
"- Delete the last line of information entered" & vbCrLf & _
"- Open the associated Batch Numbers spreadsheet" & vbCrLf & _
"- Manually delete the dates and job numbers currently against the batch numbers")
End If
End Sub
However no message box is appearing if the cells hit 10250. What am I doing wrong?
(I am also trying to achieve line breaks in the message box).