View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Check Drive Space

a bit simpler alternative to using api..

Function FreeKB(DriveSpec As String)
With CreateObject("Scripting.FileSystemObject")
If Not .DriveExists(DriveSpec) Then
FreeKB = CVErr(xlErrRef)
Else
FreeKB = .GetDrive(DriveSpec).FreeSpace \ 1024
End If
End With
End Function



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Charles" wrote:

Hi is it possible to write code to check available space
on a drive from Excel?.
TIA
Charles