I am using the example on Chip Pearson's web page http://www.cpearson.com/excel/vbe.htm for creating an even procedure in another workbook for formatting printed output from that workbook.
I have modified his code as follows:
It works as expected and creates the Workbook_BeforePrint procedure. However whenever the code runs it opens a VBA window and shows the newly created code. No errors, just gives focus to the VBA window. This isn't a problem for me while I'm programming/debugging, but the end user shouldn't see this.
Any ideas why this is happening and how to keep it from happening?
Thanks for any help/suggestions.
Bookmarks