Hi
Please do not quote the entire message
OK. Put this code in ThisWorkbook module (right click on ThisWorkbook)
Note: adjust the sheet name and the range accordingly.Code:Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim r As Range Const MySheet = "Sheet1" '<<<<< adjust to suit Const MyRange = "A2:B32" '<<<<< adjust to suit Set r = Worksheets(MySheet).Range(MyRange) If Application.WorksheetFunction.Count(r.Columns(2)) < _ Application.WorksheetFunction.CountA(r.Columns(1)) Then MsgBox "Qty missing!", vbInformation On Error Resume Next Application.Goto r.Columns(2).SpecialCells(4) On Error GoTo 0 Cancel = True End If End Sub





Reply With Quote
Bookmarks