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.
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.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"
\\server\share\file directly is immune to mapping drift and works in scheduled and service contexts where no letters exist at all.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.
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.