📅  最后修改于: 2022-03-11 14:51:56.685000             🧑  作者: Mango
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