-
Hi
Set Cancel = True
[VBA]
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Sheets("Daily Centre Inputs").Range("D6,F6,C8:C18,I6:I18,A22:K22,A29,A36,H36").Value = "" Then
MsgBox "Incomplete fields. Please check your data ensuring any required cells are complete otherwise you will not be able to close or save the workbook"
Cancel = True
'What do I need to code here to stop workbook from being closed????
End If
End Sub
[/VBA]
br
Tommy Bak
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules