View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Check Drive Space

but depends upon Scripting being allowed, not true in many commercial
environments

--

HTH

RP

"keepITcool" wrote in message
...
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