before close event with condition
On Nov 21, 9:59 am, Dave O wrote:
I'm a bit familiar with workbook event Workbook_BeforeClose.
The only code you'd need is this line in the Workbook_BeforeClose:
if range("g2").value = "unbalanced" then msgbox("This analysis does
not balance.")
Please try that, and let us know if you require anything else.
Dave O
Eschew Obfuscation
This works ok. Thanks!
Is there also a way to create the msgbox with a cancel option to be
able to go back and change the sheet.
Cheers,
Harold
|