View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Folder Tree and size

Paul,

In the module "modFolderTree", search for the lines (about line numbers
335 - 340)

If FullPaths = True Then
Dest.Value = FolderObj.Path
Else
Dest.Value = FolderObj.Name
End If

and replace them with the following:

If FullPaths = True Then
Dest.Value = FolderObj.Path & _
" (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")"
Else
Dest.Value = FolderObj.Name & _
" (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")"
End If

I might make including the folder and/or file size an additional option on
the form. Its a good idea.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email on the web site)

"Paul" wrote in message
ups.com...
Hi all,

I have used Chip Pearsons Dir Tree, which is great, however I need
some code that tells me how much MB is used in a directory level that
I choose.
Can any one help me with this please.

I'm not good at writing VB code, but can follow it a bit.

TIA Paul