Searching...
1:54 AM

Format File size vb6 code

code:
Public Function FileSize(ByVal StrSize As String) As String 'Function by andy aka British_Intel
    If StrSize$ < 1024 Then
        FileSize = StrSize$ & " Bytes"
    ElseIf StrSize$ < 1048576 Then
        FileSize = Format(StrSize$ / 1024#, "###0.00") & " KB"
    ElseIf StrSize$ > 1048576 Then
        FileSize = Format(StrSize$ / 1024# ^ 2, "###0.00") & " MB"
    End If
End Function

0 comments:

Post a Comment

 
Back to top!