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.
FreeSpace turns a mid-write failure into a clean up-front message naming the drive and the amount needed.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
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.
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.