Run Time Error 339: a file is missing or invalid


In some cases if a file goes missing or has become corrupted it will generate this error. The full error message usually states exactly which system file is causing this error and where it is supposed to be.

Here are the most common files that generate this error and the link to a replacement file:

Chartinput.ocx -
ATLWin.ocx -
PDF_in_the_box.ocx -
ATLWinSE.ocx -


Once you have the file you need follow the rest of the directions below:

  • If the link above points to a zip file you need to open it first to get the system file you need so you can copy it to your system folder.
  • Your system folder is typically c:\windows\syswow64 on new machines and c:\Windows\System32 on older ones
  • (If it asks you to replace the file that is already there you need to replace it with the new copy.)
  • First try rebooting and see if the error message as been resolved if so, you are all set.
  • If not you will have to register the file manually. Note that the tag "missing file name" in the instrucitons below refers to the file that is generating the error.

If you are running XP:

  • Go to Start > Run
  • Type in: regsvr32 c:\windows\system32\"Missing file name"
  • You should get a pop-up windows stating the DLLserver succeeded.
  • Now reboot your machine again and give it another try.

If you are running Vista or Win7 you will not be able to register the file directly:

  • go to start > "start search" and type in CMD.
  • It will find the "command prompt" and have it listed above.
  • Right-click and choose "run as an administrator"
  • Then click on "next" or "ok" depending on the prompt that comes up next.
  • Now you should be able to run the below command from inside the command window.
  • if you have a 32bit machine use the command:
    regsvr32 c:\windows\system32\"missing file name"
  • or if you have a 64bit machine:
    Regsvr32 c:\windows\syswow64\"missing file name"
  • (Those are also the locations you should copy the system file to if you have not done so already.)
  • When done you must reboot.