Hi I have a workbook_beforeclose event, which searched for cells highlighted orange and then displays a userform giving the user options.

The code works fine, if I close the workbook itself. However if I have several workbooks open and I close the whole of Excel and the workbook is not the currently active workbook the code doesn't trigger. Is there a way to ensure that the workbook_beforeclose event code will always run?

i hope that makes sense, if not let me know and I'll try and explain again. Also if you want to see the code I can provide it, but I don't think its that necessary at the moment, as the problem is not with the code itself just the execution thereof