Free/Availble Free Disk space - How?
Free/Availble Free Disk space - How?
(OP)
Colleagues,
subject line says it.
I found DriveInfo.TotalFreeSpace and DriveInfo.AvailableFreeSpace in .NET Help, but when I type it in VS 2019's VB code Editor, I get only these options:

Here are my "Imports":

Everything seems being in place, right? Nevertheless - this:

What am I missing?
Regards,
Ilya
subject line says it.
I found DriveInfo.TotalFreeSpace and DriveInfo.AvailableFreeSpace in .NET Help, but when I type it in VS 2019's VB code Editor, I get only these options:

Here are my "Imports":

Everything seems being in place, right? Nevertheless - this:

What am I missing?
Regards,
Ilya
RE: Free/Availble Free Disk space - How?
That's essentially what the error message is saying - that it needs an object (a drive object) to be able to execute the method
So, the following should work:
CODE -->
Dim oDI As DriveInfo oDI = DriveInfo.GetDrives(0) ' first drive MsgBox("Drive: " & oDI.Name & " Available Free space: " & oDI.AvailableFreeSpace)
RE: Free/Availble Free Disk space - How?
Thank you, StrongM!
Regards,
Ilya