I have a spreadsheet containing VBA code which worked fine in Excel 2007 but does not run now that I've switched to Excel 2013 contained in Office 365 Home Professional. I'm calling Workbook_BeforePrint, from within the ThisWorkbook object, and it appears that the call is never made. I've simplified my implementation of Workbook_BeforePrint(for the purposes of this question) as follows:
Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) MsgBox ("In Workbook_BeforePrint") End SubWhen I do a File > Print > Show Print Preview, no message box appears.
This worked in Excel 2007. Functions I've written, located in Modules.MyFunctions, are being correctly called as spreadsheet cells are evaluated. I am not setting Application.EnableEvents to true or false anywhere. Does anyone know why ThisWorkbook.Workbook_BeforePrint is not working in Excel 2013?
Thanks.