Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
mrclinker
 
Posts: n/a
Default Getting Amount Free Disk Space On A Drive


Dear experts:

I want to get the amount of free disk space on a drive or network
mapped drive, and store it in a cell. ¿How can you do that?

Thank you very much,

Mr.Clinker
Uruguay


--
mrclinker
------------------------------------------------------------------------
mrclinker's Profile: http://www.excelforum.com/member.php...o&userid=33907
View this thread: http://www.excelforum.com/showthread...hreadid=541510

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Getting Amount Free Disk Space On A Drive

Function GetDriveSpace(DriveLetter As String)
Dim oFSO As Object, oDrive As Object
If Right(DriveLetter, 1) < ":" Then DriveLetter = DriveLetter & ":"
Set oFSO = CreateObject("Scripting.FileSystemobject")
Set oDrive = oFSO.getDrive(DriveLetter)
GetDriveSpace = oDrive.freespace
Set oDrive = Nothing
Set oFSO = Nothing
End Function


--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"mrclinker" wrote
in message ...

Dear experts:

I want to get the amount of free disk space on a drive or network
mapped drive, and store it in a cell. ¿How can you do that?

Thank you very much,

Mr.Clinker
Uruguay


--
mrclinker
------------------------------------------------------------------------
mrclinker's Profile:

http://www.excelforum.com/member.php...o&userid=33907
View this thread: http://www.excelforum.com/showthread...hreadid=541510



  #3   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default Getting Amount Free Disk Space On A Drive

In VBE: ToolsReferences tick Microsoft Scripting Runtime

Function FreeSpace(sDriveName As String)
Static oFSO As FileSystemObject
If oFSO Is Nothing Then Set oFSO = New FileSystemObject
FreeSpace = oFSO.GetDrive(sDriveName).FreeSpace
End Function

HTH
--
AP

"mrclinker" a écrit
dans le message de news:
...

Dear experts:

I want to get the amount of free disk space on a drive or network
mapped drive, and store it in a cell. ¿How can you do that?

Thank you very much,

Mr.Clinker
Uruguay


--
mrclinker
------------------------------------------------------------------------
mrclinker's Profile:
http://www.excelforum.com/member.php...o&userid=33907
View this thread: http://www.excelforum.com/showthread...hreadid=541510



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a limit to the amount of space in filter ian coney Excel Discussion (Misc queries) 3 January 9th 06 03:37 PM
Any Tricks to decreasing Workbook size (disk space usage)? Bruce Excel Discussion (Misc queries) 3 August 16th 05 02:20 PM
How do I use flash drive in Excel.(selected drive is not in use) Douglas123toexcel Excel Discussion (Misc queries) 2 June 23rd 05 11:52 PM


All times are GMT +1. The time now is 05:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"