Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Workbook_BeforePrint no Longer Working in Excel 2013

$
0
0

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 Sub
When 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.




Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>