return message if drive is full when saving a file

Posted on 2006-05-11
Medium Priority
Last Modified: 2010-05-01
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
Question by:isnoend2001
  • 2
LVL 19

Accepted Solution

BrianGEFF719 earned 1000 total points
ID: 16659861
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, "\"))

Author Comment

ID: 16660167
Thanks BrianGEFF719
I get a overflow message with that program. I don't think it works with large drives

Author Comment

ID: 16660306
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:

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question