Mattantaliss
Board Regular
- Joined
- Sep 6, 2005
- Messages
- 52
Hello,
I have set up some code in a Workbook_BeforePrint Sub to log information as worksheets are printed. That is, for example, I have sheetA, sheetB, and sheetLog, and whenever a user prints either sheetA or sheetB, my code will take some information (e.g., name and date) from that sheet and copy it to sheetLog.
The issue I have now discovered is that the information will also be logged if the user merely executes a Print Preview, which makes sense to me. I am wondering, though, if there is a way to differentiate, in the code, between an actual 'Print' and just a 'Print Preview'. I am envisioning something like:
Does such a distinction between 'Print' and 'Print Preview' exist?
I have set up some code in a Workbook_BeforePrint Sub to log information as worksheets are printed. That is, for example, I have sheetA, sheetB, and sheetLog, and whenever a user prints either sheetA or sheetB, my code will take some information (e.g., name and date) from that sheet and copy it to sheetLog.
The issue I have now discovered is that the information will also be logged if the user merely executes a Print Preview, which makes sense to me. I am wondering, though, if there is a way to differentiate, in the code, between an actual 'Print' and just a 'Print Preview'. I am envisioning something like:
Code:
If <just Print Preview> Then
<don't log information>
Else 'actually Printing
<do stuff as normal>
End If