Author Topic: System Print event  (Read 6078 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: System Print event
« Reply #15 on: March 17, 2008, 02:59:06 PM »
So .. I had a great idea today to resolve this .. but then it killed excel, so I am back to nothing ...

This was my idea ... in ThisWorkbook, I created a private global variable "AllowPrint", then in the BeginPrint event, I checked "AllowPrint" to see if it is true or false, If it was True (meaning don't allow printing), then run the various subroutines needed, set Cancel to true, set AllowPrint to False, then use the PrintOut method to print.

My thought was that the PrintOut method would fire the BeginPrint event a second time ... I know folks are cringing due to the apparent circular nature of calling a printing method from within a BeginPrint event ... anyway, on the subsequent BeginPrint event, I would allow the print to complete and set AllowPrint = True, thus the next call should cause the BeginPrint event to fire twice.

So, I started printing .. and then excel crashed and burned ... I'll have to do more testing
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

ML

  • Guest

ML

  • Guest
Re: System Print event
« Reply #17 on: March 31, 2008, 05:36:21 PM »

I had a similar problem to which I still never got a good answer;
there is no event for after row insert.

Try that one

Mark