It is nothing to do with where the print button is.
Choose a cell, any cell, anywhere in the workbook, on any worksheet. A cell that is away from your data.
The same cell can be used for all the worksheets.
The cell is used to either hold the words "PRINT PDF" or to be blank.
The new line(below) in Sub SaveQuoteAsPDF places the words "PRINT PDF" in that cell
When you run SaveQuoteAsPDF we need to stop the BeforePrint from cancelling your PDF report and we do this by putting a condition in the BeforePrint macro, telling it to look at the value of the cell that may (or may not) contain the words "PRINT PDF". The condition is in this in line:
If the condition is satisfied (ie the cell contains "PRINT PDF") then it bypasses the "cancel" print control
The next line in the same macro re-instates the value in the cell to blank, stopping anyone from printing again
In summary when your run the PDF macro it temporarily changes the value of one cell to include the words "PRINT PDF" and it is then changed back to blank again by the BeforeClose macro.
Hope this helps.
Bookmarks