Create Printer Error for testing purposes

ajgarrison

New Member
Joined
Jun 16, 2019
Messages
10
I have written an error handler for a "print" command button. The button prints several reports based upon the form with the "print" button. My code is to generate a VbRetryCancel message box if there is an error at the printer.

I need to be able to generate something at the printer that will return an error so I can clear the error and attempt to retry in order to resume printing.

Any suggestions, thanks in advance.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
physically turn it off, unplug the LAN, remove a colour cartridge, remove paper or add really thick paper to force a jam any of those should give you numerous errors
 
Upvote 0
I had tried turning off and unplug LAN. These did not return an Access error. Access still printed and the print was in the Spool until I cleared the error on the printer.
 
Upvote 0
can you force it to print direct rather than spool the job ?
 
Upvote 0
Partly at least that's how printers work. It should actually print the job once the jam/paper problem/electrical supply is fixed (so you don't necessarily need to hit a print button again).
 
Upvote 0
Thanks to all. I'm a novice and still have had no success.
So far I have not successfully thrown an error to "fire" my error handler.

I appreciate the help I'm getting.
 
Upvote 0
Well I expect the Raise function would do it? Wouldn't take a minute to test?
Not something I've done I admit. I spend all my time trying to avoid them. :D
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top