Runtime Error 61: “Disk full,” explained and fixed

Error 61, “Disk full”, means a write ran out of room on the destination volume. Usually it is exactly what it says, but the volume in question is not always the one people check first: temporary files may go to a different drive than the output, network drives carry quotas that bite while the server shows terabytes free, and a nearly-full disk can fail a large write while small ones still succeed. The code cannot manufacture space; it can only fail cleanly and say where.

For people who just run the program

  1. Check free space on the destination drive, and on the system drive too. Many programs build output in a temp location first. Either drive being full produces the same error.
  2. On a network drive, ask about quotas. A personal quota can be exhausted while the drive itself looks empty of your files and the server reports plenty of space overall.
  3. Empty the recycle bin and clear old exports. For an urgent run, yesterday's outputs and the bin are the fastest space to reclaim, and both are safe to review.
  4. Do not delete files belonging to the program itself. Freeing space by removing program or data files trades a full disk for a broken installation.

For people who write the code

  1. Check space before starting a big write. A pre-flight check with the FileSystemObject's FreeSpace turns a mid-write failure into a clean up-front message naming the drive and the amount needed.
  2. Dim fso As Object, drv As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set drv = fso.GetDrive(fso.GetDriveName(destPath))
    If drv.FreeSpace < estimatedBytes Then Err.Raise 61  ' fail early, on purpose
  3. Write to temp, then move. Building the file on a roomy local volume and moving the finished file across keeps partial files off the target and makes the space failure happen at one predictable point.
  4. Name the volume in the error you show. “Disk full” with no location sends users to check the wrong drive. The destination path and free space belong in the message your handler presents.
A disk-full failure mid-write leaves a partial file that looks real. Downstream steps that check only for the file's existence will happily process a truncated export. Write to a temporary name and rename on success, so existence means completeness.

If it still happens

If the drive reports gigabytes free and writes still fail with 61, look at file-system limits instead of space: a FAT32 volume cannot hold a file over 4 GB, and a directory with an enormous number of files can fail creation on some systems. The error says “full”; the limit may be size-per-file or count, not bytes free.

Common questions

Can a quota cause error 61 when the drive has free space? Yes. Quotas limit one user's total regardless of the volume's free space, and the write fails with the same disk full error when the quota is reached.

Does error 61 damage the file being written? It leaves it incomplete. The data written before the failure stays, the rest never arrives, which is why write-to-temp-then-rename is the standard defense.

Related errors

Runtime Error 57 · Runtime Error 71 · Runtime Error 322