Avatar of jazzIIIlove
jazzIIIlove
Flag for Sweden

asked on 

round is not working for Cstr in VBS

Hi;

Following vbs snippet is not working which I want to round a file size:

 strWrite.WriteLine(oF.Name + "," + CStr(Round(oF.Size/1048576),2) + "," + CStr(oF.Files.Count) + "," + CStr(oF.Subfolders.Count))

Open in new window


whereas this is working which is not rounded:

 strWrite.WriteLine(oF.Name + "," + CStr(oF.Size/1048576) + "," + CStr(oF.Files.Count) + "," + CStr(oF.Subfolders.Count))

Open in new window


And I want to round the value. What to do?

Regards.
VB ScriptVisual Basic ClassicVisual Basic.NET

Avatar of undefined
Last Comment
jazzIIIlove

8/22/2022 - Mon