Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to make a spreadsheet that will hold network share names in one
column (ie: \\drive\folder\) and in adjacent columns show the total size, space used, and space available for that drive. Doulas Steele from the Access forum came up with this code: Code:
Declare Function GetDiskFreeSpaceEx Lib "kernel32" _ Alias "GetDiskFreeSpaceExA" _ (ByVal lpcurRootPathName As String, _ lpFreeBytesAvailableToCaller As Currency, _ lpTotalNumberOfBytes As Currency, _ lpTotalNumberOfFreeBytes As Currency) As Long Public Function fFreeBytes(NetworkShare As String) As Long Dim curBytesFreeToCaller As Currency Dim curTotalBytes As Currency Dim curTotalFreeBytes As Currency Call GetDiskFreeSpaceEx(NetworkShare, _ curBytesFreeToCaller, _ curTotalBytes, _ curTotalFreeBytes) fFreeBytes = CLng(Format$(curTotalFreeBytes * 10000, "###,###,###,##0")) End Function function in Excel (ie: =fFreeBytes(\\drive\folder) but I am obviously doing it wrong. Any ideas? Thanks, JFree |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Network drive | Excel Worksheet Functions | |||
map network drive | Excel Programming | |||
Using An Add-in On A Network Drive | Excel Programming | |||
Link workbooks-C drive to network drive | Excel Worksheet Functions | |||
Userform Local Drive & Network drive question | Excel Programming |