It seems that there really is to much code in the workbook.'I put all of the codes in the worksheet_Change in code for worksheet and they all seemed to work. I ended up going with this code for now.
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Intersect(Target, Union(Range("H104"), Range("L104"), Range("P104"), Range("T104"), Range("X104"))) Is Nothing Then Exit Sub
If Range("H104").Value < Range("F104").Value - 0.02 Or Range("H104").Value > Range("F104").Value + 0.02 Then
MsgBox "SCALE Check 1 HAS FAILED CALIBRATION AND MUST BE RECALIBRATED BEFORE IT CAN BE USED TO TAKE WEIGHTS"
End If
If Range("L104").Value < Range("J104").Value - 0.02 Or Range("L104").Value > Range("J104").Value + 0.02 Then
MsgBox "SCALE Check 2 HAS FAILED CALIBRATION AND MUST BE RECALIBRATED BEFORE IT CAN BE USED TO TAKE WEIGHTS"
End If
If Range("P104").Value < Range("N104").Value - 0.02 Or Range("P104").Value > Range("N104").Value + 0.02 Then
MsgBox "SCALE Check 3 HAS FAILED CALIBRATION AND MUST BE RECALIBRATED BEFORE IT CAN BE USED TO TAKE WEIGHTS"
End If
If Range("T104").Value < Range("R104").Value - 0.02 Or Range("T104").Value > Range("R104").Value + 0.02 Then
MsgBox "SCALE Check 4 HAS FAILED CALIBRATION AND MUST BE RECALIBRATED BEFORE IT CAN BE USED TO TAKE WEIGHTS"
End If
If Range("X104").Value < Range("V104").Value - 0.02 Or Range("X104").Value > Range("V104").Value + 0.02 Then
MsgBox "SCALE Check 5 HAS FAILED CALIBRATION AND MUST BE RECALIBRATED BEFORE IT CAN BE USED TO TAKE WEIGHTS"
End If
End Sub
I'm still not really sure why its not working in the workbook as I removed all the exit subs and did not get the procedure to large worning but it still would not work when I copied and pasted it there. One thing i've learned there are alot of different ways to write code to get the same end result. And alot of it seems to be personal prefrence. Thanks to everyone for there assistance. You have all been very helpful.
Bookmarks