return message if drive is full when saving a file

Hi experts
I would like to find if there is enough availible space on a hard drive before saving a file.
Need to use app.path to get drive letter.
Using vb6
Thank you
Who is Participating?
BrianGEFF719Connect With a Mentor Commented:
Take a look at the following code that displays available space on all drives:

Then to get your current drive from app.path you could do:

Dim myDrive As String
myDrive = Left(App.Path, InStr(App.Path, "\"))
isnoend2001Author Commented:
Thanks BrianGEFF719
I get a overflow message with that program. I don't think it works with large drives
isnoend2001Author Commented:
Hi BrianGEFF719
I am giving you the points because i did not mention it had to work on huge drives
i found the answer here:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.