Hi all,

I don't have a lot of experience with vba and I've been twisting my melon over this all morning; help would be really appreciated!

Basically I want to make sure that all the required cells have been completed on closing the work book but theworkbook closes regardless of 'ok' or 'cancel'. I tried unload me instead of Exit Sub but it opens the debugger:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    If IsEmpty(Sheet1.Range("c2")) Then
        iReply = MsgBox("Do you really want to close the spreadsheet?", vbOKCancel, "Incomplete form!")
            If iReply = vbCancel Then Exit Sub
                        
        End If
End Sub
Thanks,

Neil