Results 1 to 2 of 2
Thread: Auto close
2001-04-09, 19:51 #1snax500Guest
In Excel2000, I have the following auto close macro:
For Each cell In Range("c88")
If cell > 0 Then
If cell.Offset(3, 0) = 0 Then
MsgBox "Please check that Margin% is complete"
I then want the macro to stop the user from leaving the file so that they can fix their error. How do I stop the closing of the file after my error message?
2001-04-10, 05:49 #2
- Join Date
- Apr 2001
- Thanked 0 Times in 0 Posts
Re: Auto close
Hallo, I am not an expert but I think you should try the following:
Put your code in the Workbook_BeforeClose event. Then you will have an option to cancel the closing event. Search XLHelp for BeforeClose for more info.