Runtime Error 482: “Printer error,” explained and fixed
Error 482, “Printer error”, is the generic failure raised when printing from classic VB/VBA code fails at the printer or the spooler. It deliberately says almost nothing, because the causes are physical and various: the printer is off or offline, out of paper or toner, the queue is jammed, the network path is gone, or no default printer exists at all. VBA reports that printing failed; discovering why is a matter of checking the printer's state in order, from the machine outward. It is an environment error, not a code error, though code decides how gracefully it is presented.
For people who just run the program
- Check the printer itself first. Power, paper, toner, and any error light or message on its display. Most 482s are answered by the printer's own screen in seconds.
- Check the queue. Open the printer's queue in Windows settings: a stuck or errored job at the front blocks everything behind it. Cancel the stuck job, not just your own.
- Confirm the printer exists and is the default. Code usually prints to the default printer. If printers were renamed, removed, or the default changed during an office shuffle, the target may not be there.
- Print a test page from Windows. If the test page fails too, the problem is the printer or its connection, and IT or the vendor owns it; if the test page works, tell the maintainer the failure is inside the program's print path.
For people who write the code
- Never let a bare 482 reach the user. Wrap print operations and translate: report the printer name, its status from the system, and the likely checks. The translation layer is the entire user experience of this error.
On Error GoTo PrintFail
Printer.Print "Report header"
Printer.EndDoc
Exit Sub
PrintFail:
If Err.Number = 482 Then
MsgBox "Printing to " & Printer.DeviceName & " failed. " & _
"Check that the printer is on and has paper."
End If
- Verify a usable printer before offering print. Checking that a default printer exists and is not flagged offline at feature entry turns a mid-job failure into a clear up-front message.
- Release the job cleanly on failure. A print job abandoned mid-page (no EndDoc/KillDoc) leaves partial output in the queue that confuses the next attempt. Error paths in print code should terminate the document explicitly.
Error 482 does not distinguish “printer broken” from “no printer.” A workstation with no default printer configured raises the same 482 as a jammed one. Any diagnostic that assumes hardware failure without checking configuration first will mislead half its cases.
If it still happens
If the printer prints test pages and other programs print fine while the application still raises 482, check what the code prints to: a hard-coded printer name from a previous office layout, or the Printer object being used after the default changed mid-session. Log Printer.DeviceName at the failure; a surprise name there is the answer.
Common questions
Is error 482 a problem with my document? No. It is raised by the printing operation itself. The document prints or not depending on the printer's state, which is why a Windows test page is the fastest way to split printer problems from program problems.
Why is the message so vague? Because classic VB's Printer object funnels every spooler and device failure into this one error. The specificity has to come from checking the printer, the queue, and the configuration, which is what the steps do.
Related errors