Runtime Error 68: “Device unavailable,” explained and fixed

Error 68, “Device unavailable”, means the target device itself cannot be reached: a drive letter with nothing mapped to it, a printer that is offline or deleted, a port with no device behind it. It differs from a missing file or folder (errors 53 and 76) in level: those mean the device answered but the path was wrong, while 68 means nothing answered at all. In modern practice the unmapped or remapped network drive is the overwhelming cause.

For people who just run the program

  1. Check the drive letter exists. Open File Explorer and look for the letter the program uses. Network drives mapped at sign-in can be missing after a password change, a VPN drop, or a policy change.
  2. Click the drive in Explorer before retrying. A mapped drive with a red X is disconnected but often reconnects on first access; programs that address it directly may fail until it has been woken up.
  3. For printer errors, check the printer exists and is online. A printer removed during an office move leaves its name in old settings pointing at a device that is no longer there.
  4. Report the drive letter or printer name from the message context. IT can remap a named drive in minutes; “a device error” without the name starts the search from zero.

For people who write the code

  1. Test device readiness before opening. Check Dir$ on the root of the drive or the FileSystemObject Drive object's IsReady and fail with a message naming the device, instead of letting an Open deep in the code raise a bare 68.
  2. Dim fso As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    If Not fso.DriveExists("K:") Then MsgBox "Drive K: is not mapped"
    If Not fso.GetDrive("K:").IsReady Then MsgBox "Drive K: is not ready"
  3. Prefer UNC paths for shared resources. Drive letters are per-user, per-session state. Code that uses \\server\share\file directly is immune to mapping drift and works in scheduled and service contexts where no letters exist at all.
  4. Separate device errors from path errors in handlers. Error 68 (device gone) and error 76 (path wrong) need different user guidance. A handler that lumps them together sends users to fix permissions when the drive was never mapped.
A mapped drive can exist and still be unavailable. Mapping is only a name; if the server is down or the session expired, the letter sits in Explorer while every access fails with 68. “The drive is there” and “the device is available” are different claims.

If it still happens

If the device is mapped, ready, and other programs use it, check the context the code runs in: macros launched by a scheduler, a service, or an elevated process do not inherit the interactive user's drive mappings. The device is unavailable because, in that session, it was never made available; switch to UNC paths for unattended code.

Common questions

What is the difference between error 68 and error 76? Error 68 says the device cannot be reached at all, like a drive letter with no mapping. Error 76 says the device answered but the folder path on it does not exist.

Why does the drive work in Explorer but the program says unavailable? Explorer reconnects disconnected drives on demand and runs in your session. A program using the letter directly, or running in a different session, can fail until the connection is re-established.

Related errors

Runtime Error 57 · Runtime Error 71 · Runtime Error 75