M
Mike Bassett
I am attempting to use the
Application.DocumentBeforePrint event to trigger a
UserForm. I have a class containing the required code to
open the userform on condition that various formfields
have not been filled in, and the class is registered on
opening the document. All works well but only once. If I
launch the print task then the form opens, I then cancel
the print and launch print again but the form doesn't
open, I have to run the registration manually or close
and re-open the document before it will work again. What
can I do to overcome this problem?
Also I would like to know if it is possible to cancel the
print from the event procedure as I do not want the user
to be able to print if the fields are not filled in.
Application.DocumentBeforePrint event to trigger a
UserForm. I have a class containing the required code to
open the userform on condition that various formfields
have not been filled in, and the class is registered on
opening the document. All works well but only once. If I
launch the print task then the form opens, I then cancel
the print and launch print again but the form doesn't
open, I have to run the registration manually or close
and re-open the document before it will work again. What
can I do to overcome this problem?
Also I would like to know if it is possible to cancel the
print from the event procedure as I do not want the user
to be able to print if the fields are not filled in.