Answers for "excel vba number format file size"

VBA
0

excel vba number format file size

[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"
Posted by: Guest on January-27-2021
0

excel vba number format file size

Select Case objFile.Size
        Case 0 To 1023
            Cells(NextRow, "D").Value = Format(objFile.Size, "0") & "B"
        Case 1024 To 1048575
            Cells(NextRow, "D").Value = Format(objFile.Size / 1024, "0") & "KB"
        Case 1048576 To 1073741823
            Cells(NextRow, "D").Value = Format(objFile.Size / 1048576, "0") & "MB"
        Case 1073741824 To 1.11111111111074E+20
            Cells(NextRow, "D").Value = Format(objFile.Size / 1073741823, "0.00") & "GB"
End Select
Posted by: Guest on January-27-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language