Function FormatSize(pSize As Integer) As String dim nSize As double nSize=pSize if nSize<1024 then Return str(nSize)+" Bytes" else nSize=nSize/1024 if nSize<1024 then Return format(nSize,"##0.0")+" KB" else nSize=nSize/1024 if nSize<1024 then Return format(nSize,"##0.0")+" MB" else nSize=nSize/1024 if nSize<1024 then Return Format(nSize,"##0.0")+" GB" else nSize=nSize/1024 Return Format(nSize,"######0.0")+" TB" end end end end End Function